summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll
diff options
context:
space:
mode:
authorJustin Hibbits <jrh29@alumni.cwru.edu>2018-07-18 04:25:10 +0000
committerJustin Hibbits <jrh29@alumni.cwru.edu>2018-07-18 04:25:10 +0000
commitd52990c71b6f83c9beeba4efc9103412e0416ba9 (patch)
treefebc0bdc8253b60c767bc182970d894684843e06 /llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll
parent4fa4fa6a73a7829494df8272ef49825fb2066d1a (diff)
downloadbcm5719-llvm-d52990c71b6f83c9beeba4efc9103412e0416ba9.tar.gz
bcm5719-llvm-d52990c71b6f83c9beeba4efc9103412e0416ba9.zip
Introduce codegen for the Signal Processing Engine
Summary: The Signal Processing Engine (SPE) is found on NXP/Freescale e500v1, e500v2, and several e200 cores. This adds support targeting the e500v2, as this is more common than the e500v1, and is in SoCs still on the market. This patch is very intrusive because the SPE is binary incompatible with the traditional FPU. After discussing with others, the cleanest solution was to make both SPE and FPU features on top of a base PowerPC subset, so all FPU instructions are now wrapped with HasFPU predicates. Supported by this are: * Code generation following the SPE ABI at the LLVM IR level (calling conventions) * Single- and Double-precision math at the level supported by the APU. Still to do: * Vector operations * SPE intrinsics As this changes the Callee-saved register list order, one test, which tests the precise generated code, was updated to account for the new register order. Reviewed by: nemanjai Differential Revision: https://reviews.llvm.org/D44830 llvm-svn: 337347
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll b/llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll
index 5317829c6ce..80a733c5da8 100644
--- a/llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll
+++ b/llvm/test/CodeGen/PowerPC/fast-isel-load-store.ll
@@ -3,6 +3,7 @@
; When fastisel better supports VSX fix up this test case.
;
; RUN: llc -relocation-model=static < %s -O0 -verify-machineinstrs -fast-isel -fast-isel-abort=1 -mattr=-vsx -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64
+; RUN: llc -relocation-model=static < %s -O0 -verify-machineinstrs -fast-isel -fast-isel-abort=1 -mattr=spe -mtriple=powerpc-unknown-linux-gnu -mcpu=e500 | FileCheck %s --check-prefix=SPE
; This test verifies that load/store instructions are properly generated,
; and that they pass MI verification.
@@ -62,19 +63,25 @@ define i64 @t4() nounwind {
define float @t5() nounwind {
; ELF64: t5
+; SPE: t5
%1 = load float, float* @e, align 4
; ELF64: lfs
+; SPE: lwz
%2 = fadd float %1, 1.0
; ELF64: fadds
+; SPE: efsadd
ret float %2
}
define double @t6() nounwind {
; ELF64: t6
+; SPE: t6
%1 = load double, double* @f, align 8
; ELF64: lfd
+; SPE: evldd
%2 = fadd double %1, 1.0
; ELF64: fadd
+; SPE: efdadd
ret double %2
}
@@ -126,19 +133,25 @@ define void @t10(i64 %v) nounwind {
define void @t11(float %v) nounwind {
; ELF64: t11
+; SPE: t11
%1 = fadd float %v, 1.0
store float %1, float* @e, align 4
; ELF64: fadds
; ELF64: stfs
+; SPE: efsadd
+; SPE: stw
ret void
}
define void @t12(double %v) nounwind {
; ELF64: t12
+; SPE: t12
%1 = fadd double %v, 1.0
store double %1, double* @f, align 8
; ELF64: fadd
; ELF64: stfd
+; SPE: efdadd
+; SPE: evstdd
ret void
}
OpenPOWER on IntegriCloud