diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-23 23:42:23 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-23 23:42:23 +0000 |
commit | 41ebcda8f41854339c07f1445b5bcc6d7bfd2af5 (patch) | |
tree | 9a1aad1bf650247a56dd1e74076eb0cfebe1fd83 /llvm/test/CodeGen/Thumb2 | |
parent | 03a384ec1f9f3b1b8ccf5588753264dc230cb7cc (diff) | |
download | bcm5719-llvm-41ebcda8f41854339c07f1445b5bcc6d7bfd2af5.tar.gz bcm5719-llvm-41ebcda8f41854339c07f1445b5bcc6d7bfd2af5.zip |
Add a test case for global live range splitting.
llvm-svn: 157357
Diffstat (limited to 'llvm/test/CodeGen/Thumb2')
-rw-r--r-- | llvm/test/CodeGen/Thumb2/inflate-regs.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Thumb2/inflate-regs.ll b/llvm/test/CodeGen/Thumb2/inflate-regs.ll index 264863512ef..d8a558c97e2 100644 --- a/llvm/test/CodeGen/Thumb2/inflate-regs.ll +++ b/llvm/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 +} |