mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-05 02:07:16 +00:00
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25b8390bf2
commit
3d78b23d24
24
test/Transforms/SCCP/calltest.ll
Normal file
24
test/Transforms/SCCP/calltest.ll
Normal file
@ -0,0 +1,24 @@
|
||||
; RUN: llvm-as < %s | opt -sccp -adce -simplifycfg | llvm-dis | 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user