summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2017-03-02 13:47:03 +0000
committerAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2017-03-02 13:47:03 +0000
commit2855dc7ddc0e653dbc932dd3de7e3c0e99a41346 (patch)
tree388b4c2af1a20bbc3df5bc8dc20273c280c748df
parent1c787e0b49207ca5cdc67dbc21f39a444a983169 (diff)
downloadbcm5719-llvm-2855dc7ddc0e653dbc932dd3de7e3c0e99a41346.tar.gz
bcm5719-llvm-2855dc7ddc0e653dbc932dd3de7e3c0e99a41346.zip
Added special test covering a problem with PIC relocation model on SLM architecture. The fix will come in D26855.
llvm-svn: 296746
-rw-r--r--llvm/test/CodeGen/X86/recip-pic.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/recip-pic.ll b/llvm/test/CodeGen/X86/recip-pic.ll
new file mode 100644
index 00000000000..7a0d03d6072
--- /dev/null
+++ b/llvm/test/CodeGen/X86/recip-pic.ll
@@ -0,0 +1,27 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=i386-unknown-linux-gnu -enable-unsafe-fp-math -mcpu=slm -relocation-model=pic | FileCheck %s --check-prefix=CHECK
+
+define fastcc float @foo(float %x) unnamed_addr #0 {
+; CHECK-LABEL: foo:
+; CHECK: # BB#0: # %entry
+; CHECK-NEXT: calll .L0$pb
+; CHECK-NEXT: .Lcfi0:
+; CHECK-NEXT: .cfi_adjust_cfa_offset 4
+; CHECK-NEXT: .L0$pb:
+; CHECK-NEXT: popl %eax
+; CHECK-NEXT: .Lcfi1:
+; CHECK-NEXT: .cfi_adjust_cfa_offset -4
+; CHECK-NEXT: .Ltmp0:
+; CHECK-NEXT: addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
+; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
+; CHECK-NEXT: divss %xmm0, %xmm1
+; CHECK-NEXT: movaps %xmm1, %xmm0
+; CHECK-NEXT: movss %xmm1, (%eax)
+; CHECK-NEXT: retl
+entry:
+ %div = fdiv fast float 3.0, %x
+ store float %div, float* undef, align 4
+ ret float %div
+}
+
+
OpenPOWER on IntegriCloud