Skip to content

Commit ef2fcfc

Browse files
committed
address PR
1 parent 51a5847 commit ef2fcfc

File tree

5 files changed

+577
-2925
lines changed

5 files changed

+577
-2925
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

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

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

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5878,14 +5878,6 @@ AMDGPUInstructionSelector::selectVOP3PMadMixModsImpl(MachineOperand &Root,
58785878
CheckAbsNeg();
58795879
}
58805880

5881-
// Since we looked through FPEXT and removed it, we must also remove
5882-
// G_TRUNC. G_TRUNC to 16-bits would have a destination in RC VGPR_16, which
5883-
// is not compatible with MadMix instructions
5884-
Register PeekSrc = Src;
5885-
if (Subtarget->useRealTrue16Insts() &&
5886-
mi_match(PeekSrc, *MRI, m_GTrunc(m_Reg(PeekSrc))))
5887-
Src = PeekSrc;
5888-
58895881
Matched = true;
58905882
}
58915883

0 commit comments

Comments
 (0)