mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
11d48d6932
Upgrade to use new Tcl exec based test harness. This exposes 3 bugs that were previously not being reported: test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll test/Transforms/GlobalOpt/memset.ll test/Transforms/IndVarsSimplify/exit_value_tests.llx llvm-svn: 36065
26 lines
552 B
LLVM
26 lines
552 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | opt -sccp -adce -simplifycfg | llvm-dis | \
|
|
; RUN: not grep br
|
|
|
|
; No matter how hard you try, sqrt(1.0) is always 1.0. This allows the
|
|
; optimizer to delete this loop.
|
|
|
|
declare double %sqrt(double)
|
|
|
|
double %test(uint %param) {
|
|
entry:
|
|
br label %Loop
|
|
|
|
Loop:
|
|
%I2 = phi uint [ 0, %entry ], [ %I3, %Loop ]
|
|
%V = phi double [ 1.0, %entry], [ %V2, %Loop ]
|
|
|
|
%V2 = call double %sqrt(double %V)
|
|
|
|
%I3 = add uint %I2, 1
|
|
%tmp.7 = setne uint %I3, %param
|
|
br bool %tmp.7, label %Loop, label %Exit
|
|
|
|
Exit:
|
|
ret double %V
|
|
}
|