Skip to content

Commit 6dd6c73

Browse files
committed
gisel update
1 parent 73ed27c commit 6dd6c73

File tree

3 files changed

+1282
-591
lines changed

3 files changed

+1282
-591
lines changed

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ bool AMDGPUInstructionSelector::selectG_MERGE_VALUES(MachineInstr &MI) const {
639639
LLT SrcTy = MRI->getType(MI.getOperand(1).getReg());
640640

641641
const unsigned SrcSize = SrcTy.getSizeInBits();
642-
if (SrcSize < 32)
642+
if (SrcSize < 16)
643643
return selectImpl(MI, *CoverageInfo);
644644

645645
const DebugLoc &DL = MI.getDebugLoc();
@@ -1478,10 +1478,17 @@ bool AMDGPUInstructionSelector::selectG_ICMP_or_FCMP(MachineInstr &I) const {
14781478
if (Opcode == -1)
14791479
return false;
14801480

1481-
MachineInstr *ICmp = BuildMI(*BB, &I, DL, TII.get(Opcode),
1482-
I.getOperand(0).getReg())
1483-
.add(I.getOperand(2))
1484-
.add(I.getOperand(3));
1481+
MachineInstrBuilder ICmp =
1482+
BuildMI(*BB, &I, DL, TII.get(Opcode), I.getOperand(0).getReg());
1483+
if (AMDGPU::hasNamedOperand(Opcode, AMDGPU::OpName::src0_modifiers))
1484+
ICmp.addImm(0);
1485+
ICmp.add(I.getOperand(2));
1486+
if (AMDGPU::hasNamedOperand(Opcode, AMDGPU::OpName::src1_modifiers))
1487+
ICmp.addImm(0);
1488+
ICmp.add(I.getOperand(3));
1489+
if (AMDGPU::hasNamedOperand(Opcode, AMDGPU::OpName::op_sel))
1490+
ICmp.addImm(0); // op_sel
1491+
14851492
RBI.constrainGenericRegister(ICmp->getOperand(0).getReg(),
14861493
*TRI.getBoolRC(), *MRI);
14871494
bool Ret = constrainSelectedInstRegOperands(*ICmp, TII, TRI, RBI);
@@ -4597,6 +4604,7 @@ AMDGPUInstructionSelector::selectVOP3OpSelMods(MachineOperand &Root) const {
45974604
}};
45984605
}
45994606

4607+
// FIXME-TRUE16 remove when fake16 is removed
46004608
InstructionSelector::ComplexRendererFns
46014609
AMDGPUInstructionSelector::selectVINTERPMods(MachineOperand &Root) const {
46024610
Register Src;

0 commit comments

Comments
 (0)