[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/hoist_instr.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Sep 9 15:02:39 PDT 2006



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

hoist_instr.ll added (r1.1)
---
Log message:

new testcase


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

 hoist_instr.ll |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)


Index: llvm/test/Regression/Transforms/InstCombine/hoist_instr.ll
diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/hoist_instr.ll:1.1
*** /dev/null	Sat Sep  9 17:02:35 2006
--- llvm/test/Regression/Transforms/InstCombine/hoist_instr.ll	Sat Sep  9 17:02:25 2006
***************
*** 0 ****
--- 1,16 ----
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | %prcontext div 1 | grep then:
+ 
+ ;; This tests that the div is hoisted into the then block.
+ 
+ int %foo(bool %C, int %A, int %B) {
+ entry:
+ 	br bool %C, label %then, label %endif
+ 
+ then:
+ 	br label %endif
+ 
+ endif:
+ 	%X = phi int [%A, %then], [15, %entry]
+ 	%Y = div int %X, 42
+ 	ret int %Y
+ }






More information about the llvm-commits mailing list