summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorSasa Stankovic <Sasa.Stankovic@imgtec.com>2014-10-01 08:22:21 +0000
committerSasa Stankovic <Sasa.Stankovic@imgtec.com>2014-10-01 08:22:21 +0000
commit7072a7968f5f32a5ae8d4c971d5893dacbca1d14 (patch)
tree868fc8cf80b6bdb465230cbdec55baac3ad34685 /llvm/test/CodeGen
parenta5f070aec0386d941a9a1bc2d47adc95553975ea (diff)
downloadbcm5719-llvm-7072a7968f5f32a5ae8d4c971d5893dacbca1d14.tar.gz
bcm5719-llvm-7072a7968f5f32a5ae8d4c971d5893dacbca1d14.zip
[mips] For indirect calls we don't need $gp to point to .got. Mips linker
doesn't generate lazy binding stub for a function whose address is taken in the program. Differential Revision: http://reviews.llvm.org/D5067 llvm-svn: 218744
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Mips/gpreg-lazy-binding.ll8
-rw-r--r--llvm/test/CodeGen/Mips/prevent-hoisting.ll11
2 files changed, 15 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/Mips/gpreg-lazy-binding.ll b/llvm/test/CodeGen/Mips/gpreg-lazy-binding.ll
index 88e596b3bb0..3a636d82533 100644
--- a/llvm/test/CodeGen/Mips/gpreg-lazy-binding.ll
+++ b/llvm/test/CodeGen/Mips/gpreg-lazy-binding.ll
@@ -25,3 +25,11 @@ entry:
ret void
}
+define void @no_lazy(void (i32)* %pf) {
+
+; CHECK-LABEL: no_lazy
+; CHECK-NOT: gp_disp
+
+ tail call void %pf(i32 1)
+ ret void
+}
diff --git a/llvm/test/CodeGen/Mips/prevent-hoisting.ll b/llvm/test/CodeGen/Mips/prevent-hoisting.ll
index da665c21090..210fe3b0f6d 100644
--- a/llvm/test/CodeGen/Mips/prevent-hoisting.ll
+++ b/llvm/test/CodeGen/Mips/prevent-hoisting.ll
@@ -10,16 +10,19 @@
; CHECK-LABEL: readLumaCoeff8x8_CABAC
-; The check for "addiu" instruction is added so that we can match the correct "b" instruction.
+; The check for first "addiu" instruction is added so that we can match the correct "b" instruction.
; CHECK: addiu ${{[0-9]+}}, $zero, -1
; CHECK: b $[[BB0:BB[0-9_]+]]
+; CHECK-NEXT: addiu ${{[0-9]+}}, $zero, 0
-; Check that sll instruction that writes to $1 starts basic block.
-; CHECK: {{BB[0-9_#]+}}:
+; Check that at the start of a fallthrough block there is a instruction that writes to $1.
+; CHECK-NEXT: {{BB[0-9_#]+}}:
+; CHECK-NEXT: lw $[[R1:[0-9]+]], %got(assignSE2partition)($[[R2:[0-9]+]])
; CHECK-NEXT: sll $1, $[[R0:[0-9]+]], 4
-; Check that identical sll instruction starts another basic block.
+; Check that identical instructions are at the start of a target block.
; CHECK: [[BB0]]:
+; CHECK-NEXT: lw $[[R1]], %got(assignSE2partition)($[[R2]])
; CHECK-NEXT: sll $1, $[[R0]], 4
OpenPOWER on IntegriCloud