Skip to content

Commit c087140

Browse files
committed
address PR
1 parent 082d1ae commit c087140

File tree

5 files changed

+109
-2706
lines changed

5 files changed

+109
-2706
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3663,7 +3663,7 @@ bool AMDGPUDAGToDAGISel::SelectVOP3PMadMixModsImpl(SDValue In, SDValue &Src,
36633663

36643664
// Prevent unnecessary subreg COPY to VGPR_16
36653665
if (Src.getOpcode() == ISD::TRUNCATE &&
3666-
Src.getOperand(0).getValueType().getSizeInBits() == 32) {
3666+
Src.getOperand(0).getValueType() == MVT::i32) {
36673667
Src = Src.getOperand(0);
36683668
}
36693669
return true;

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5871,14 +5871,6 @@ AMDGPUInstructionSelector::selectVOP3PMadMixModsImpl(MachineOperand &Root,
58715871
CheckAbsNeg();
58725872
}
58735873

5874-
// Since we looked through FPEXT and removed it, we must also remove
5875-
// G_TRUNC. G_TRUNC to 16-bits would have a destination in RC VGPR_16, which
5876-
// is not compatible with MadMix instructions
5877-
Register PeekSrc = Src;
5878-
if (Subtarget->useRealTrue16Insts() &&
5879-
mi_match(PeekSrc, *MRI, m_GTrunc(m_Reg(PeekSrc))))
5880-
Src = PeekSrc;
5881-
58825874
Matched = true;
58835875
}
58845876

0 commit comments

Comments
 (0)