diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-07-10 05:51:40 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-07-10 05:51:40 +0000 |
commit | 5dcc41f5b3daf6ef7097f169767291ff9cd0dd0b (patch) | |
tree | 5feccea7217ec8cf6427f2d294fd31e406c87817 /test/Transforms/InstCombine/2008-07-09-SubAndError.ll | |
parent | 743a1e6a9ced9152e24a70b7dd87153eb55c772f (diff) |
Fix overzealous optimization. Thanks to Duncan Sands for pointing out my error!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/2008-07-09-SubAndError.ll')
-rw-r--r-- | test/Transforms/InstCombine/2008-07-09-SubAndError.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-07-09-SubAndError.ll b/test/Transforms/InstCombine/2008-07-09-SubAndError.ll new file mode 100644 index 0000000000..c5b93586ba --- /dev/null +++ b/test/Transforms/InstCombine/2008-07-09-SubAndError.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep {sub i32 0} +; PR2330 + +define i32 @foo(i32 %a) nounwind { +entry: + %A = sub i32 5, %a + %B = and i32 %A, 2 + ret i32 %B +} |