diff options
author | David L Kreitzer <david.l.kreitzer@intel.com> | 2016-05-17 12:47:46 +0000 |
---|---|---|
committer | David L Kreitzer <david.l.kreitzer@intel.com> | 2016-05-17 12:47:46 +0000 |
commit | e7c583e06ffc9cc203da6ba20a463c84cc79dbe7 (patch) | |
tree | ca9b6f0b9986ce8cb3628ff72c7f83f9865e5d53 /llvm/test/CodeGen/X86/fp-une-cmp.ll | |
parent | 75f8f6e1116901a0ce24e1c0159ef059a8518c18 (diff) | |
download | bcm5719-llvm-e7c583e06ffc9cc203da6ba20a463c84cc79dbe7.tar.gz bcm5719-llvm-e7c583e06ffc9cc203da6ba20a463c84cc79dbe7.zip |
Fix for PR27750. Correctly handle the case where the fallthrough block and
target block are the same in getFallThroughMBB.
Differential Revision: http://reviews.llvm.org/D20288
llvm-svn: 269760
Diffstat (limited to 'llvm/test/CodeGen/X86/fp-une-cmp.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/fp-une-cmp.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/fp-une-cmp.ll b/llvm/test/CodeGen/X86/fp-une-cmp.ll index 179fffca379..653040053c2 100644 --- a/llvm/test/CodeGen/X86/fp-une-cmp.ll +++ b/llvm/test/CodeGen/X86/fp-une-cmp.ll @@ -102,6 +102,34 @@ if.end: ret void } +; Test that an FP oeq/une conditional branch can be inverted successfully even +; when the true and false targets are the same (PR27750). +; +; CHECK-LABEL: pr27750 +; CHECK: ucomiss +; CHECK-NEXT: jne [[TARGET:.*]] +; CHECK-NEXT: jp [[TARGET]] +define void @pr27750(i32* %b, float %x, i1 %y) { +entry: + br label %for.cond + +for.cond: + br label %for.cond1 + +for.cond1: + br i1 %y, label %for.body3.lr.ph, label %for.end + +for.body3.lr.ph: + store i32 0, i32* %b, align 4 + br label %for.end + +for.end: +; After block %for.cond gets eliminated, the two target blocks of this +; conditional block are the same. + %tobool = fcmp une float %x, 0.000000e+00 + br i1 %tobool, label %for.cond, label %for.cond1 +} + declare void @a() !1 = !{!"branch_weights", i32 1, i32 1000} |