[llvm-commits] CVS: llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Mar 4 01:35:13 PST 2006



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

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

new testcase


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

 mulfactor2.ll |   13 +++++++++++++
 1 files changed, 13 insertions(+)


Index: llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll
diff -c /dev/null llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll:1.1
*** /dev/null	Sat Mar  4 03:35:12 2006
--- llvm/test/Regression/Transforms/Reassociate/mulfactor2.ll	Sat Mar  4 03:35:02 2006
***************
*** 0 ****
--- 1,13 ----
+ ; This should turn into one multiply and one add.
+ 
+ ; RUN: llvm-as < mulfactor2.ll | opt -instcombine -reassociate -instcombine | llvm-dis | grep mul | wc -l | grep 1 &&
+ ; RUN: llvm-as < mulfactor2.ll | opt -instcombine -reassociate -instcombine | llvm-dis | grep add | wc -l | grep 1
+ int %main(int %t) {
+         %tmp.3 = mul int %t, 12         ; <int> [#uses=1]
+         %tmp.4 = add int %tmp.3, 5              ; <int> [#uses=1]
+         %tmp.6 = mul int %t, 6          ; <int> [#uses=1]
+         %tmp.8 = mul int %tmp.4, 3              ; <int> [#uses=1]
+         %tmp.9 = add int %tmp.8, %tmp.6         ; <int> [#uses=1]
+         ret int %tmp.9
+ }
+ 






More information about the llvm-commits mailing list