summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-27 17:42:31 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-27 17:42:31 +0000
commit71d3b895ba9f5cd970a1b7bd685c4482c03995f0 (patch)
tree14662c77f9dbb2e2baeae5a652ba49a6f1e08f6c /llvm/test
parentf2752a39382095606ddaaba8f6ba31c7f3f6f5b8 (diff)
downloadbcm5719-llvm-71d3b895ba9f5cd970a1b7bd685c4482c03995f0.tar.gz
bcm5719-llvm-71d3b895ba9f5cd970a1b7bd685c4482c03995f0.zip
Also add <imp-def> operands for defined and dead super-registers when rewriting.
We cannot rely on the <imp-def> operands added by LiveIntervals in all cases as demonstrated by the test case. llvm-svn: 130313
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/ARM/crash-greedy.ll25
1 files changed, 24 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/ARM/crash-greedy.ll b/llvm/test/CodeGen/ARM/crash-greedy.ll
index 0b229b27d2d..8a865e23d0a 100644
--- a/llvm/test/CodeGen/ARM/crash-greedy.ll
+++ b/llvm/test/CodeGen/ARM/crash-greedy.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -regalloc=greedy -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim | FileCheck %s
+; RUN: llc < %s -regalloc=greedy -mcpu=cortex-a8 -relocation-model=pic -disable-fp-elim -verify-machineinstrs | FileCheck %s
;
; ARM tests that crash or fail with the greedy register allocator.
@@ -59,3 +59,26 @@ for.end: ; preds = %cond.end
ret void
}
+; CHECK: insert_elem
+; This test has a sub-register copy with a kill flag:
+; %vreg6:ssub_3<def> = COPY %vreg6:ssub_2<kill>; QPR_VFP2:%vreg6
+; The rewriter must do something sensible with that, or the scavenger crashes.
+define void @insert_elem() nounwind {
+entry:
+ br i1 undef, label %if.end251, label %if.then84
+
+if.then84: ; preds = %entry
+ br i1 undef, label %if.end251, label %if.then195
+
+if.then195: ; preds = %if.then84
+ %div = fdiv float 1.000000e+00, undef
+ %vecinit207 = insertelement <4 x float> undef, float %div, i32 1
+ %vecinit208 = insertelement <4 x float> %vecinit207, float 1.000000e+00, i32 2
+ %vecinit209 = insertelement <4 x float> %vecinit208, float 1.000000e+00, i32 3
+ %mul216 = fmul <4 x float> zeroinitializer, %vecinit209
+ store <4 x float> %mul216, <4 x float>* undef, align 16
+ br label %if.end251
+
+if.end251: ; preds = %if.then195, %if.then84, %entry
+ ret void
+}
OpenPOWER on IntegriCloud