summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-23 23:42:23 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-05-23 23:42:23 +0000
commit39867e6646a7dba628b0217309b1425a04b4a3e1 (patch)
treea7aa7518f201094841ab65d7a0bb70efc304a38e /test/CodeGen/Thumb2
parentd74d2847573df690b6a91254688ef3fd974f83f7 (diff)
downloadllvm-39867e6646a7dba628b0217309b1425a04b4a3e1.tar.gz
llvm-39867e6646a7dba628b0217309b1425a04b4a3e1.tar.bz2
llvm-39867e6646a7dba628b0217309b1425a04b4a3e1.tar.xz
Add a test case for global live range splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2')
-rw-r--r--test/CodeGen/Thumb2/inflate-regs.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/inflate-regs.ll b/test/CodeGen/Thumb2/inflate-regs.ll
index 264863512e..d8a558c97e 100644
--- a/test/CodeGen/Thumb2/inflate-regs.ll
+++ b/test/CodeGen/Thumb2/inflate-regs.ll
@@ -20,3 +20,30 @@ entry:
store float %a, float* %p, align 4
ret void
}
+
+; CHECK: global_split
+;
+; Same thing, but across basic blocks.
+;
+; CHECK: vldr s
+; CHECK-NOT: vstr
+; CHECK: vadd.f32
+; CHECK-NOT: vstr
+; CHECK: vorr
+; CHECK: vstr s
+define void @global_split(float* nocapture %p1, float* nocapture %p2) nounwind ssp {
+entry:
+ %0 = load float* %p1, align 4
+ %add = fadd float %0, 1.000000e+00
+ tail call void asm sideeffect "", "~{d0},~{d1},~{d2},~{d3},~{d4},~{d5},~{d6},~{d7},~{d8},~{d9},~{d10},~{d11},~{d12},~{d13},~{d14},~{d15}"() nounwind
+ %cmp = fcmp ogt float %add, 0.000000e+00
+ br i1 %cmp, label %if.then, label %if.end
+
+if.then:
+ store float %add, float* %p2, align 4
+ br label %if.end
+
+if.end:
+ store float %add, float* %p1, align 4
+ ret void
+}