[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2006-09-15-CastToBool.ll
Chris Lattner
lattner at cs.uiuc.edu
Fri Sep 15 20:13:37 PDT 2006
Changes in directory llvm/test/Regression/Transforms/InstCombine:
2006-09-15-CastToBool.ll added (r1.1)
---
Log message:
Testcase for PR913: http://llvm.org/PR913
---
Diffs of the changes: (+14 -0)
2006-09-15-CastToBool.ll | 14 ++++++++++++++
1 files changed, 14 insertions(+)
Index: llvm/test/Regression/Transforms/InstCombine/2006-09-15-CastToBool.ll
diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2006-09-15-CastToBool.ll:1.1
*** /dev/null Fri Sep 15 22:13:32 2006
--- llvm/test/Regression/Transforms/InstCombine/2006-09-15-CastToBool.ll Fri Sep 15 22:13:22 2006
***************
*** 0 ****
--- 1,14 ----
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep and
+ ; PR913
+
+ int %test(int* %tmp1) {
+ %tmp = load int* %tmp1 ; <int> [#uses=1]
+ %tmp = cast int %tmp to uint ; <uint> [#uses=1]
+ %tmp2 = shr uint %tmp, ubyte 5 ; <uint> [#uses=1]
+ %tmp2 = cast uint %tmp2 to int ; <int> [#uses=1]
+ %tmp3 = and int %tmp2, 1 ; <int> [#uses=1]
+ %tmp3 = cast int %tmp3 to bool ; <bool> [#uses=1]
+ %tmp34 = cast bool %tmp3 to int ; <int> [#uses=1]
+ ret int %tmp34
+ }
+
More information about the llvm-commits
mailing list