[llvm] r296746 - Added special test covering a problem with PIC relocation model on SLM architecture. The fix will come in D26855.

Andrew V. Tischenko via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 05:47:04 PST 2017


Author: avt77
Date: Thu Mar  2 07:47:03 2017
New Revision: 296746

URL: http://llvm.org/viewvc/llvm-project?rev=296746&view=rev
Log:
Added special test covering a problem with PIC relocation model on SLM architecture. The fix will come in D26855.

Added:
    llvm/trunk/test/CodeGen/X86/recip-pic.ll

Added: llvm/trunk/test/CodeGen/X86/recip-pic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/recip-pic.ll?rev=296746&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/recip-pic.ll (added)
+++ llvm/trunk/test/CodeGen/X86/recip-pic.ll Thu Mar  2 07:47:03 2017
@@ -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
+}
+
+




More information about the llvm-commits mailing list