[llvm] [AMDGPU] Fix VOP3P NEG fold to check the use opcode, not the def (PR #219728)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 02:30:16 PDT 2026
================
@@ -5283,16 +5300,19 @@ static bool isValidToPack(SrcStatus HiStat, SrcStatus LoStat, Register NewReg,
IsHalfState(HiStat);
}
-std::pair<Register, unsigned> AMDGPUInstructionSelector::selectVOP3PModsImpl(
- Register RootReg, const MachineRegisterInfo &MRI, bool IsDOT) const {
+std::pair<Register, unsigned>
+AMDGPUInstructionSelector::selectVOP3PModsImpl(const MachineOperand &Root,
+ const MachineRegisterInfo &MRI,
+ bool IsDOT) const {
+ Register RootReg = Root.getReg();
unsigned Mods = 0;
// No modification if Root type is not form of <2 x Type>.
if (isVectorOfTwoOrScalar(RootReg, MRI) != TypeClass::VECTOR_OF_TWO) {
Mods |= SISrcMods::OP_SEL_1;
return {RootReg, Mods};
}
- SearchOptions SO(RootReg, MRI);
+ SearchOptions SO(*Root.getParent());
----------------
aobolensk wrote:
reverted
https://github.com/llvm/llvm-project/pull/219728
More information about the llvm-commits
mailing list