[llvm-commits] CVS: llvm/test/Regression/Transforms/SCCP/calltest.ll

Chris Lattner lattner at cs.uiuc.edu
Tue Apr 13 14:44:01 PDT 2004


Changes in directory llvm/test/Regression/Transforms/SCCP:

calltest.ll added (r1.1)

---
Log message:

New testcase


---
Diffs of the changes:  (+24 -0)

Index: llvm/test/Regression/Transforms/SCCP/calltest.ll
diff -c /dev/null llvm/test/Regression/Transforms/SCCP/calltest.ll:1.1
*** /dev/null	Tue Apr 13 14:43:43 2004
--- llvm/test/Regression/Transforms/SCCP/calltest.ll	Tue Apr 13 14:43:33 2004
***************
*** 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
+ }





More information about the llvm-commits mailing list