Skip to content

Commit 3f6366e

Browse files
SPV_INTEL_long_composites is not completed: mark test cases as XFAIL
1 parent b8194a0 commit 3f6366e

File tree

7 files changed

+36
-84
lines changed

7 files changed

+36
-84
lines changed

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,6 @@ class SPIRVInstructionSelector : public InstructionSelector {
221221
bool selectWaveReduceSum(Register ResVReg, const SPIRVType *ResType,
222222
MachineInstr &I) const;
223223

224-
//void renderImm32(MachineInstrBuilder &MIB, const MachineInstr &I,
225-
// int OpIdx) const;
226-
//void renderFImm64(MachineInstrBuilder &MIB, const MachineInstr &I,
227-
// int OpIdx) const;
228-
229224
bool selectConst(Register ResVReg, const SPIRVType *ResType,
230225
MachineInstr &I) const;
231226

@@ -2464,24 +2459,7 @@ bool SPIRVInstructionSelector::selectICmp(Register ResVReg,
24642459
CmpOpc = getICmpOpcode(Pred);
24652460
return selectCmp(ResVReg, ResType, CmpOpc, I);
24662461
}
2467-
/*
2468-
void SPIRVInstructionSelector::renderFImm64(MachineInstrBuilder &MIB,
2469-
const MachineInstr &I,
2470-
int OpIdx) const {
2471-
assert(I.getOpcode() == TargetOpcode::G_FCONSTANT && OpIdx == -1 &&
2472-
"Expected G_FCONSTANT");
2473-
const ConstantFP *FPImm = I.getOperand(1).getFPImm();
2474-
addNumImm(FPImm->getValueAPF().bitcastToAPInt(), MIB);
2475-
}
24762462

2477-
void SPIRVInstructionSelector::renderImm32(MachineInstrBuilder &MIB,
2478-
const MachineInstr &I,
2479-
int OpIdx) const {
2480-
assert(I.getOpcode() == TargetOpcode::G_CONSTANT && OpIdx == -1 &&
2481-
"Expected G_CONSTANT");
2482-
addNumImm(I.getOperand(1).getCImm()->getValue(), MIB);
2483-
}
2484-
*/
24852463
std::pair<Register, bool>
24862464
SPIRVInstructionSelector::buildI32Constant(uint32_t Val, MachineInstr &I,
24872465
const SPIRVType *ResType) const {

llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ SPIRVLegalizerInfo::SPIRVLegalizerInfo(const SPIRVSubtarget &ST) {
146146

147147
for (auto Opc : getTypeFoldingSupportedOpcodes())
148148
getActionDefinitionsBuilder(Opc).custom();
149-
//getActionDefinitionsBuilder(TargetOpcode::G_CONSTANT).custom();
150-
//getActionDefinitionsBuilder(TargetOpcode::G_FCONSTANT).custom();
151149

152150
getActionDefinitionsBuilder(G_GLOBAL_VALUE).alwaysLegal();
153151

llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -396,29 +396,7 @@ static void widenScalarLLTNextPow2(Register Reg, MachineRegisterInfo &MRI) {
396396
if (NewSz != Sz)
397397
MRI.setType(Reg, LLT::scalar(NewSz));
398398
}
399-
/*
400-
static std::pair<Register, unsigned>
401-
createNewIdReg(SPIRVType *SpvType, Register SrcReg, MachineRegisterInfo &MRI,
402-
const SPIRVGlobalRegistry &GR) {
403-
if (!SpvType)
404-
SpvType = GR.getSPIRVTypeForVReg(SrcReg);
405-
const TargetRegisterClass *RC = GR.getRegClass(SpvType);
406-
Register Reg = MRI.createGenericVirtualRegister(GR.getRegType(SpvType));
407-
MRI.setRegClass(Reg, RC);
408-
unsigned GetIdOp = SPIRV::GET_ID;
409-
if (RC == &SPIRV::fIDRegClass)
410-
GetIdOp = SPIRV::GET_fID;
411-
else if (RC == &SPIRV::pIDRegClass)
412-
GetIdOp = SPIRV::GET_pID;
413-
else if (RC == &SPIRV::vfIDRegClass)
414-
GetIdOp = SPIRV::GET_vfID;
415-
else if (RC == &SPIRV::vpIDRegClass)
416-
GetIdOp = SPIRV::GET_vpID;
417-
else if (RC == &SPIRV::vIDRegClass)
418-
GetIdOp = SPIRV::GET_vID;
419-
return {Reg, GetIdOp};
420-
}
421-
*/
399+
422400
static void setInsertPtAfterDef(MachineIRBuilder &MIB, MachineInstr *Def) {
423401
MachineBasicBlock &MBB = *Def->getParent();
424402
MachineBasicBlock::iterator DefIt =
@@ -502,23 +480,6 @@ void processInstr(MachineInstr &MI, MachineIRBuilder &MIB,
502480
MRI.setType(OpReg, GR->getRegType(SpvType));
503481
}
504482
}
505-
506-
/*void processInstr2(MachineInstr &MI, MachineIRBuilder &MIB,
507-
MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR) {
508-
MIB.setInsertPt(*MI.getParent(), MI.getIterator());
509-
for (auto &Op : MI.operands()) {
510-
if (!Op.isReg() || Op.isDef())
511-
continue;
512-
Register OpReg = Op.getReg();
513-
SPIRVType *SpvType = GR->getSPIRVTypeForVReg(OpReg);
514-
auto IdOpInfo = createNewIdReg(SpvType, OpReg, MRI, *GR);
515-
MIB.buildInstr(IdOpInfo.second).addDef(IdOpInfo.first).addUse(OpReg);
516-
const TargetRegisterClass *RC = GR->getRegClass(SpvType);
517-
if (RC != MRI.getRegClassOrNull(OpReg))
518-
MRI.setRegClass(OpReg, RC);
519-
Op.setReg(IdOpInfo.first);
520-
}
521-
}*/
522483
} // namespace llvm
523484

524485
static void

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites/long-composite-construct.ll

Lines changed: 8 additions & 4 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites/long-constant-composite.ll

Lines changed: 8 additions & 4 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites/long-spec-const-composite.ll

Lines changed: 11 additions & 7 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_long_composites/long-type-struct.ll

Lines changed: 8 additions & 5 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)