mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
e24be6085b
This essentially reverts the x86-64 side effect of r327198. For x86-32, @PLT (R_386_PLT32) is not suitable in -fno-pic mode so the code forces MO_NO_FLAG (like a forced dso_local) (https://bugs.llvm.org//show_bug.cgi?id=36674#c6). For x86-64, both `call/jmp foo` and `call/jmp foo@PLT` emit R_X86_64_PLT32 (https://sourceware.org/bugzilla/show_bug.cgi?id=22791) so there is no difference using @PLT. Using @PLT is actually favorable because this drops a difference with -fpie/-fpic code and makes it possible to avoid a canonical PLT entry when taking the address of an undefined function symbol.
29 lines
1.3 KiB
LLVM
29 lines
1.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -O2 -mtriple=x86_64-linux-android -mattr=+mmx -enable-legalize-types-checking | FileCheck %s
|
|
; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu -mattr=+mmx -enable-legalize-types-checking | FileCheck %s
|
|
|
|
; Test the softened result of extractelement op code.
|
|
define fp128 @TestExtract(<2 x double> %x) nounwind {
|
|
; CHECK-LABEL: TestExtract:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: subq $40, %rsp
|
|
; CHECK-NEXT: movaps %xmm0, (%rsp) # 16-byte Spill
|
|
; CHECK-NEXT: callq __extenddftf2
|
|
; CHECK-NEXT: movaps %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
|
|
; CHECK-NEXT: movaps (%rsp), %xmm0 # 16-byte Reload
|
|
; CHECK-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1]
|
|
; CHECK-NEXT: callq __extenddftf2
|
|
; CHECK-NEXT: movaps %xmm0, %xmm1
|
|
; CHECK-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
|
|
; CHECK-NEXT: addq $40, %rsp
|
|
; CHECK-NEXT: jmp __multf3@PLT # TAILCALL
|
|
entry:
|
|
; Simplified instruction pattern from the output of llvm before r289042,
|
|
; for a boost function ...::insert<...>::traverse<...>().
|
|
%a = fpext <2 x double> %x to <2 x fp128>
|
|
%0 = extractelement <2 x fp128> %a, i32 0
|
|
%1 = extractelement <2 x fp128> %a, i32 1
|
|
%2 = fmul fp128 %0, %1
|
|
ret fp128 %2
|
|
}
|