[PATCH] D67981: [NFC][PowerPC] Adding FeatureFPU in the definition of FeatureISA3_0
Amy Kwan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 17:02:45 PDT 2019
amyk updated this revision to Diff 222729.
amyk added a comment.
I've realized I forgot to attach a full context patch.
Updated with full context.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67981/new/
https://reviews.llvm.org/D67981
Files:
llvm/lib/Target/PowerPC/PPC.td
llvm/test/CodeGen/PowerPC/feature-isav30.ll
Index: llvm/test/CodeGen/PowerPC/feature-isav30.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/PowerPC/feature-isav30.ll
@@ -0,0 +1,18 @@
+; RUN: not llc -mattr=+isa-v30-instructions,+spe -verify-machineinstrs \
+; RUN: -mtriple=powerpc-unknown-unknown %s -o - 2>&1 | FileCheck %s
+
+; This IR aims to test how having ISA 3.0 implies that FPU is also enabled, as
+; a compliant implementation of ISA 3.0 should have the floating point unit.
+;
+; Thus, also setting SPE along side of having ISA 3.0 would not be correct as
+; both SPE and traditional floating point cannot be enabled.
+;
+; The triple is set to powerpc-unknown-unknown, as SPE is only supported on
+; 32-bit targets.
+
+define signext i32 @test_fpu_v30_feature () {
+; CHECK: LLVM ERROR: SPE and traditional floating point cannot both be enabled.
+entry:
+ ret i32 0
+}
+
Index: llvm/lib/Target/PowerPC/PPC.td
===================================================================
--- llvm/lib/Target/PowerPC/PPC.td
+++ llvm/lib/Target/PowerPC/PPC.td
@@ -189,7 +189,8 @@
def FeatureISA3_0 : SubtargetFeature<"isa-v30-instructions", "IsISA3_0",
"true",
- "Enable instructions added in ISA 3.0.">;
+ "Enable instructions added in ISA 3.0.",
+ [FeatureFPU]>;
def FeatureP9Altivec : SubtargetFeature<"power9-altivec", "HasP9Altivec", "true",
"Enable POWER9 Altivec instructions",
[FeatureISA3_0, FeatureP8Altivec]>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67981.222729.patch
Type: text/x-patch
Size: 1671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191002/21150984/attachment.bin>
More information about the llvm-commits
mailing list