diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-10 00:16:22 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-04-10 00:16:22 +0000 |
commit | fdb230a154ead49cf0ded5b4587be994ec2f43e0 (patch) | |
tree | 5f06fe3d706c779f383e7b64a0e7500449c6c714 /test | |
parent | 2d620c571cb53993b788893b6ef73a6e2805411f (diff) | |
download | external_llvm-fdb230a154ead49cf0ded5b4587be994ec2f43e0.zip external_llvm-fdb230a154ead49cf0ded5b4587be994ec2f43e0.tar.gz external_llvm-fdb230a154ead49cf0ded5b4587be994ec2f43e0.tar.bz2 |
Don't try to zExt just to check if an integer constant is zero, it might
not fit in a i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/Generic/pr12507.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/pr12507.ll b/test/CodeGen/Generic/pr12507.ll new file mode 100644 index 0000000..c793358 --- /dev/null +++ b/test/CodeGen/Generic/pr12507.ll @@ -0,0 +1,18 @@ +; RUN: llc < %s + +@c = external global i32, align 4 + +define void @foo(i160 %x) { +entry: + %cmp.i = icmp ne i160 %x, 340282366920938463463374607431768211456 + %conv.i = zext i1 %cmp.i to i32 + %tobool.i = icmp eq i32 %conv.i, 0 + br i1 %tobool.i, label %if.then.i, label %fn1.exit + +if.then.i: + store i32 0, i32* @c, align 4 + br label %fn1.exit + +fn1.exit: + ret void +} |