mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
35dddafa6b
This change enables soft-float for PowerPC64, and also makes soft-float disable all vector instruction sets for both 32-bit and 64-bit modes. This latter part is necessary because the PPC backend canonicalizes many Altivec vector types to floating-point types, and so soft-float breaks scalarization support for many operations. Both for embedded targets and for operating-system kernels desiring soft-float support, it seems reasonable that disabling hardware floating-point also disables vector instructions (embedded targets without hardware floating point support are unlikely to have Altivec, etc. and operating system kernels desiring not to use floating-point registers to lower syscall cost are unlikely to want to use vector registers either). If someone needs this to work, we'll need to change the fact that we promote many Altivec operations to act on v4f32. To make it possible to disable Altivec when soft-float is enabled, hardware floating-point support needs to be expressed as a positive feature, like the others, and not a negative feature, because target features cannot have dependencies on the disabling of some other feature. So +soft-float has now become -hard-float. Fixes PR26970. llvm-svn: 283060
55 lines
1.4 KiB
LLVM
55 lines
1.4 KiB
LLVM
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -O0 < %s | FileCheck %s
|
|
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O0 < %s | FileCheck %s
|
|
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O0 < %s | FileCheck %s
|
|
|
|
; Testing operations in soft-float mode
|
|
define double @foo() #0 {
|
|
entry:
|
|
%a = alloca double, align 8
|
|
%b = alloca double, align 8
|
|
%0 = load double, double* %a, align 8
|
|
%1 = load double, double* %b, align 8
|
|
%add = fadd double %0, %1
|
|
ret double %add
|
|
|
|
; CHECK-LABEL: __adddf3
|
|
}
|
|
|
|
define double @foo1() #0 {
|
|
entry:
|
|
%a = alloca double, align 8
|
|
%b = alloca double, align 8
|
|
%0 = load double, double* %a, align 8
|
|
%1 = load double, double* %b, align 8
|
|
%mul = fmul double %0, %1
|
|
ret double %mul
|
|
|
|
; CHECK-LABEL: __muldf3
|
|
}
|
|
|
|
define double @foo2() #0 {
|
|
entry:
|
|
%a = alloca double, align 8
|
|
%b = alloca double, align 8
|
|
%0 = load double, double* %a, align 8
|
|
%1 = load double, double* %b, align 8
|
|
%sub = fsub double %0, %1
|
|
ret double %sub
|
|
|
|
; CHECK-LABEL: __subdf3
|
|
}
|
|
|
|
define double @foo3() #0 {
|
|
entry:
|
|
%a = alloca double, align 8
|
|
%b = alloca double, align 8
|
|
%0 = load double, double* %a, align 8
|
|
%1 = load double, double* %b, align 8
|
|
%div = fdiv double %0, %1
|
|
ret double %div
|
|
|
|
; CHECK-LABEL: __divdf3
|
|
}
|
|
|
|
attributes #0 = {"use-soft-float"="true" }
|