[llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll

Jim Laskey jlaskey at apple.com
Tue Jun 13 06:10:56 PDT 2006



Changes in directory llvm/test/Regression/CodeGen/Generic:

2006-06-13-ComputeMaskedBitsCrash.ll added (r1.1)
---
Log message:

Tests to make sure that ComputeMaskedBits discards bits for shifts.


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

 2006-06-13-ComputeMaskedBitsCrash.ll |   50 +++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+)


Index: llvm/test/Regression/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll
diff -c /dev/null llvm/test/Regression/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll:1.1
*** /dev/null	Tue Jun 13 08:10:54 2006
--- llvm/test/Regression/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll	Tue Jun 13 08:10:44 2006
***************
*** 0 ****
--- 1,50 ----
+ ; RUN: llvm-as < %s | llc -fast
+ 
+ uint %test1(uint %tmp1) {
+   %tmp2 = or uint %tmp1, 2147483648
+   %tmp3 = shr uint %tmp2, ubyte 31
+   %tmp4 = and uint %tmp3, 2147483648
+   %tmp5 = seteq uint %tmp4, 0
+   br bool %tmp5, label %cond_true, label %cond_false
+   
+ cond_true:
+   ret uint %tmp1
+   
+ cond_false:
+ 
+   ret uint %tmp2
+ }
+ 
+ 
+ uint %test2(uint %tmp1) {
+   %tmp2 = or uint %tmp1, 2147483648
+   %tmp3 = cast uint %tmp2 to int
+   %tmp4 = shr int %tmp3, ubyte 31
+   %tmp5 = cast int %tmp4 to uint
+   %tmp6 = and uint %tmp5, 2147483648
+   %tmp7 = seteq uint %tmp6, 0
+   br bool %tmp7, label %cond_true, label %cond_false
+   
+ cond_true:
+   ret uint %tmp1
+   
+ cond_false:
+ 
+   ret uint %tmp2
+ }
+ 
+ 
+ uint %test3(uint %tmp1) {
+   %tmp2 = or uint %tmp1, 1
+   %tmp3 = shl uint %tmp2, ubyte 31
+   %tmp4 = and uint %tmp3, 1
+   %tmp5 = seteq uint %tmp4, 0
+   br bool %tmp5, label %cond_true, label %cond_false
+   
+ cond_true:
+   ret uint %tmp1
+   
+ cond_false:
+ 
+   ret uint %tmp2
+ }






More information about the llvm-commits mailing list