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

Chris Lattner lattner at cs.uiuc.edu
Fri May 6 21:23:43 PDT 2005



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

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

test that reassociate can handle shifts


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

 shifttest.ll |   10 ++++++++++
 1 files changed, 10 insertions(+)


Index: llvm/test/Regression/Transforms/Reassociate/shifttest.ll
diff -c /dev/null llvm/test/Regression/Transforms/Reassociate/shifttest.ll:1.1
*** /dev/null	Fri May  6 23:23:40 2005
--- llvm/test/Regression/Transforms/Reassociate/shifttest.ll	Fri May  6 23:23:29 2005
***************
*** 0 ****
--- 1,10 ----
+ ; With shl->mul reassociation, we can see that this is (shl A, 9) * A
+ ;
+ ; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep 'shl .*, ubyte 9'
+ 
+ int %test(int %A, int %B) {
+ 	%X = shl int %A, ubyte 5
+ 	%Y = shl int %A, ubyte 4
+ 	%Z = mul int %Y, %X
+ 	ret int %Z
+ }






More information about the llvm-commits mailing list