Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions llvm/lib/Target/PowerPC/PPC.td
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,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",
Expand Down Expand Up @@ -377,7 +375,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">;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it instead add AssemblerPredicate to make sure the instructions are not assembled/disassembled without the feature enabled?

Copy link
Contributor Author

@diggerlin diggerlin Sep 19, 2025

Choose a reason for hiding this comment

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

since the HasBPERMD defined in

def FeatureBPERMD    : SubtargetFeature<"bpermd", "HasBPERMD", "true",
                                        "Enable the bpermd instruction">;

is not used in the llvm source code. we can delete it. the patch only clean FeatureBPERMD, which is NFC patch. Adding AssemblerPredicate change the purpose of the patch(not a NFC). if we want to add it , I can create a separate patch for it?

def HasExtDiv : Predicate<"Subtarget->hasExtDiv()">;
def IsISA2_06 : Predicate<"Subtarget->isISA2_06()">;
def IsISA2_07 : Predicate<"Subtarget->isISA2_07()">;
Expand Down Expand Up @@ -442,7 +440,6 @@ def ProcessorFeatures {
FeatureLDBRX,
Feature64BitSupport,
/* Feature64BitRegs, */
FeatureBPERMD,
FeatureExtDiv,
FeatureMFTB,
DeprecatedDST,
Expand Down
Loading