[PATCH] D128124: [X86] Remove unnecessary COPY from EmitLoweredCascadedSelect.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 09:34:29 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3706bdad4ae0: [X86] Remove unnecessary COPY from EmitLoweredCascadedSelect. (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128124/new/
https://reviews.llvm.org/D128124
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -34554,7 +34554,7 @@
// SinkMBB:
// %Result = phi [ %FalseValue, SecondInsertedMBB ], [ %TrueValue, ThisMBB ]
- Register DestReg = FirstCMOV.getOperand(0).getReg();
+ Register DestReg = SecondCascadedCMOV.getOperand(0).getReg();
Register Op1Reg = FirstCMOV.getOperand(1).getReg();
Register Op2Reg = FirstCMOV.getOperand(2).getReg();
MachineInstrBuilder MIB =
@@ -34567,11 +34567,6 @@
// The second SecondInsertedMBB provides the same incoming value as the
// FirstInsertedMBB (the True operand of the SELECT_CC/CMOV nodes).
MIB.addReg(FirstCMOV.getOperand(2).getReg()).addMBB(FirstInsertedMBB);
- // Copy the PHI result to the register defined by the second CMOV.
- BuildMI(*SinkMBB, std::next(MachineBasicBlock::iterator(MIB.getInstr())), DL,
- TII->get(TargetOpcode::COPY),
- SecondCascadedCMOV.getOperand(0).getReg())
- .addReg(FirstCMOV.getOperand(0).getReg());
// Now remove the CMOVs.
FirstCMOV.eraseFromParent();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128124.440660.patch
Type: text/x-patch
Size: 1190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220628/3c89cf33/attachment.bin>
More information about the llvm-commits
mailing list