Skip to content

Conversation

@diggerlin
Copy link
Contributor

clean unused PPC target feature FeatureBPERMD.

@llvmbot
Copy link
Member

llvmbot commented Jul 10, 2025

@llvm/pr-subscribers-backend-powerpc

Author: zhijian lin (diggerlin)

Changes

clean unused PPC target feature FeatureBPERMD.


Full diff: https://github.com/llvm/llvm-project/pull/148050.diff

2 Files Affected:

  • (modified) llvm/lib/Target/PowerPC/PPC.td (-3)
  • (modified) llvm/lib/Target/PowerPC/PPCInstrInfo.td (+1-1)
diff --git a/llvm/lib/Target/PowerPC/PPC.td b/llvm/lib/Target/PowerPC/PPC.td
index ea7c2203662bd..d4991bcba76f3 100644
--- a/llvm/lib/Target/PowerPC/PPC.td
+++ b/llvm/lib/Target/PowerPC/PPC.td
@@ -124,8 +124,6 @@ def FeatureFPCVT     : SubtargetFeature<"fpcvt", "HasFPCVT", "true",
                                         [FeatureFPU]>;
 def FeatureISEL      : SubtargetFeature<"isel","HasISEL", "true",
                                         "Enable the isel instruction">;
-def FeatureBPERMD    : SubtargetFeature<"bpermd", "HasBPERMD", "true",
-                                        "Enable the bpermd instruction">;
 def FeatureExtDiv    : SubtargetFeature<"extdiv", "HasExtDiv", "true",
                                         "Enable extended divide instructions">;
 def FeatureLDBRX     : SubtargetFeature<"ldbrx","HasLDBRX", "true",
@@ -394,7 +392,6 @@ def ProcessorFeatures {
                                                   FeatureLDBRX,
                                                   Feature64Bit,
                                                   /* Feature64BitRegs, */
-                                                  FeatureBPERMD,
                                                   FeatureExtDiv,
                                                   FeatureMFTB,
                                                   DeprecatedDST,
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index 99ef89a7fdc0c..0ce6079e2636d 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -739,7 +739,7 @@ def NoNaNsFPMath
     : Predicate<"Subtarget->getTargetMachine().Options.NoNaNsFPMath">;
 def NaNsFPMath
     : Predicate<"!Subtarget->getTargetMachine().Options.NoNaNsFPMath">;
-def HasBPERMD : Predicate<"Subtarget->hasBPERMD()">;
+def HasBPERMD : Predicate<"Subtarget->getCPUDirective() >= PPC::DIR_PWR7">;
 def HasExtDiv : Predicate<"Subtarget->hasExtDiv()">;
 def IsISA2_06 : Predicate<"Subtarget->isISA2_06()">;
 def IsISA2_07 : Predicate<"Subtarget->isISA2_07()">;

@diggerlin diggerlin requested a review from maryammo July 10, 2025 20:09
@diggerlin diggerlin requested a review from kamaub September 16, 2025 14:47
Copy link
Contributor

@lei137 lei137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR seem to have conflicts.
Either way this LGTM after that is fixed.

@diggerlin diggerlin closed this Sep 19, 2025
@diggerlin diggerlin force-pushed the digger/clean-FeatureBPERMD branch from 68ab7c0 to ba49062 Compare September 19, 2025 14:08
@diggerlin
Copy link
Contributor Author

when I rebased the code, I closed the patch by accident, I created a new patch
[PowerPC] clean unused PPC target feature FeatureBPERMD based on the latest code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants