From e5833b3215af5c6ce0b83b28abfa4ed30c1120de Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 16 Sep 2006 03:13:22 +0000 Subject: [PATCH] Testcase for PR913 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30404 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../InstCombine/2006-09-15-CastToBool.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/Transforms/InstCombine/2006-09-15-CastToBool.ll diff --git a/test/Transforms/InstCombine/2006-09-15-CastToBool.ll b/test/Transforms/InstCombine/2006-09-15-CastToBool.ll new file mode 100644 index 00000000000..e649b3eedc5 --- /dev/null +++ b/test/Transforms/InstCombine/2006-09-15-CastToBool.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep and +; PR913 + +int %test(int* %tmp1) { + %tmp = load int* %tmp1 ; [#uses=1] + %tmp = cast int %tmp to uint ; [#uses=1] + %tmp2 = shr uint %tmp, ubyte 5 ; [#uses=1] + %tmp2 = cast uint %tmp2 to int ; [#uses=1] + %tmp3 = and int %tmp2, 1 ; [#uses=1] + %tmp3 = cast int %tmp3 to bool ; [#uses=1] + %tmp34 = cast bool %tmp3 to int ; [#uses=1] + ret int %tmp34 +} + -- 2.34.1