[llvm] [X86] Use X86FixupInstTunings to select between (V)MOVSS/D and (V)BLENDPS/D (PR #143312)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 10 05:50:56 PDT 2025
================
@@ -221,8 +221,33 @@ bool X86FixupInstTuningPass::processInstruction(
auto ProcessUNPCKPS = [&](unsigned NewOpc) -> bool {
return ProcessUNPCKToIntDomain(NewOpc);
};
+
+ auto ProcessBLENDToMOV = [&](unsigned MovOpc) -> bool {
+ if (MI.getOperand(NumOperands - 1).getImm() != 1)
+ return false;
+
+ bool Force = MF.getFunction().hasOptSize();
+
+ if (!Force && !NewOpcPreferable(MovOpc))
+ return false;
+ MI.setDesc(TII->get(MovOpc));
+ MI.removeOperand(NumOperands - 1);
+ return true;
+ };
switch (Opc) {
+ case X86::VBLENDPSrri: {
+ int Imm = MI.getOperand(NumOperands - 1).getImm();
+ if (Imm != 1)
+ return false;
----------------
RKSimon wrote:
These can now be dropped and you can rely on ProcessBLENDToMOV handling
https://github.com/llvm/llvm-project/pull/143312
More information about the llvm-commits
mailing list