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 | 8aaf1979901efcb3b4de27ccb9cce4a57eaa3779 (patch) | |
tree | eaaa5f242f9ac11dad86e95b0b3f247c5ba9cdd3 /llvm/test/CodeGen | |
parent | 3b105a063fe68d4e6f6b278b69761cefb7e63bef (diff) | |
download | bcm5719-llvm-8aaf1979901efcb3b4de27ccb9cce4a57eaa3779.tar.gz bcm5719-llvm-8aaf1979901efcb3b4de27ccb9cce4a57eaa3779.zip |
DAGCombine: Avoid an edge case where it tried to create an i0 type for (x & 0) == 0.
Fixes PR16083.
llvm-svn: 182357
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/X86/shrink-compare.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/shrink-compare.ll b/llvm/test/CodeGen/X86/shrink-compare.ll index 0c16f86ff13..83793f000d5 100644 --- a/llvm/test/CodeGen/X86/shrink-compare.ll +++ b/llvm/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 +} |