diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-05-21 08:51:09 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-05-21 08:51:09 +0000 |
commit | f19b8b018be4b0478f741bf35287db3488fda8d6 (patch) | |
tree | badb6014825a9a7bd8bc2e9dcaf7a4aa37ce5972 /test/CodeGen/X86/shrink-compare.ll | |
parent | 275428fe4abd4bd690456d29c7c54143d653cb4f (diff) | |
download | llvm-f19b8b018be4b0478f741bf35287db3488fda8d6.tar.gz llvm-f19b8b018be4b0478f741bf35287db3488fda8d6.tar.bz2 llvm-f19b8b018be4b0478f741bf35287db3488fda8d6.tar.xz |
DAGCombine: Avoid an edge case where it tried to create an i0 type for (x & 0) == 0.
Fixes PR16083.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/shrink-compare.ll')
-rw-r--r-- | test/CodeGen/X86/shrink-compare.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/shrink-compare.ll b/test/CodeGen/X86/shrink-compare.ll index 0c16f86ff1..83793f000d 100644 --- a/test/CodeGen/X86/shrink-compare.ll +++ b/test/CodeGen/X86/shrink-compare.ll @@ -50,3 +50,19 @@ if.end: ; CHECK: test3: ; CHECK: cmpb $-1, %{{dil|cl}} } + +; PR16083 +define i1 @test4(i64 %a, i32 %b) { +entry: + %tobool = icmp ne i32 %b, 0 + br i1 %tobool, label %lor.end, label %lor.rhs + +lor.rhs: ; preds = %entry + %and = and i64 0, %a + %tobool1 = icmp ne i64 %and, 0 + br label %lor.end + +lor.end: ; preds = %lor.rhs, %entry + %p = phi i1 [ true, %entry ], [ %tobool1, %lor.rhs ] + ret i1 %p +} |