aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-04-16 22:03:00 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-04-16 22:03:00 +0000
commitf1a60c734c2edb97ab75e67328935538fae5bae6 (patch)
treea8ca8b24baa1537f51f682df1becfdecd315ac00 /test
parent68f89a61587e8d482347cf892c2670a869a1ad61 (diff)
downloadexternal_llvm-f1a60c734c2edb97ab75e67328935538fae5bae6.zip
external_llvm-f1a60c734c2edb97ab75e67328935538fae5bae6.tar.gz
external_llvm-f1a60c734c2edb97ab75e67328935538fae5bae6.tar.bz2
Fix updateTerminator to be resiliant to degenerate terminators where
both fallthrough and a conditional branch target the same successor. Gracefully delete the conditional branch and introduce any unconditional branch needed to reach the actual successor. This fixes memory corruption in 2009-06-15-RegScavengerAssert.ll and possibly other tests. Also, while I'm here fix a latent bug I spotted by inspection. I never applied the same fundamental fix to this fallthrough successor finding logic that I did to the logic used when there are no conditional branches. As a consequence it would have selected landing pads had they be aligned in just the right way here. I don't have a test case as I spotted this by inspection, and the previous time I found this required have of TableGen's source code to produce it. =/ I hate backend bugs. ;] Thanks to Jim Grosbach for helping me reason through this and reviewing the fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/Thumb2/thumb2-ifcvt2.ll2
-rw-r--r--test/CodeGen/X86/br-fold.ll2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-ifcvt2.ll b/test/CodeGen/Thumb2/thumb2-ifcvt2.ll
index 9a83e65..5aa9a73 100644
--- a/test/CodeGen/Thumb2/thumb2-ifcvt2.ll
+++ b/test/CodeGen/Thumb2/thumb2-ifcvt2.ll
@@ -83,7 +83,7 @@ define fastcc void @t2() nounwind {
entry:
; CHECK: t2:
; CHECK: cmp r0, #0
-; CHECK: bne
+; CHECK: %growMapping.exit
br i1 undef, label %bb.i.i3, label %growMapping.exit
bb.i.i3: ; preds = %entry
diff --git a/test/CodeGen/X86/br-fold.ll b/test/CodeGen/X86/br-fold.ll
index 1dd59a7..f004964 100644
--- a/test/CodeGen/X86/br-fold.ll
+++ b/test/CodeGen/X86/br-fold.ll
@@ -1,7 +1,7 @@
; RUN: llc -march=x86-64 < %s | FileCheck %s
; CHECK: orq
-; CHECK-NEXT: je
+; CHECK-NEXT: .LBB0_1
@_ZN11xercesc_2_513SchemaSymbols21fgURI_SCHEMAFORSCHEMAE = external constant [33 x i16], align 32 ; <[33 x i16]*> [#uses=1]
@_ZN11xercesc_2_56XMLUni16fgNotationStringE = external constant [9 x i16], align 16 ; <[9 x i16]*> [#uses=1]