Skip to content

Commit ef21bb4

Browse files
committed
Fixup
1 parent 66b2120 commit ef21bb4

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -371,19 +371,14 @@ void SPIRVModuleAnalysis::visitDecl(
371371
MAI.setSkipEmission(NextInstr);
372372
NextInstr = NextInstr->getNextNode();
373373
}
374-
} else if (Opcode == SPIRV::OpCompositeConstruct) {
374+
} else if (Opcode == SPIRV::OpConstantComposite) {
375375
GReg = handleTypeDeclOrConstant(MI, SignatureToGReg);
376376
const MachineInstr *NextInstr = MI.getNextNode();
377377
while (NextInstr && NextInstr->getOpcode() ==
378-
SPIRV::OpCompositeConstructContinuedINTEL) {
378+
SPIRV::OpConstantCompositeContinuedINTEL) {
379379
Register Tmp = handleTypeDeclOrConstant(*NextInstr, SignatureToGReg);
380-
// For the case with the global variable,
381-
// OpConstantCompositeContinuedINTEL does not go directly after
382-
// OpConstantComposite, but they are "split" by the OpVariable
383-
// instruction. My guess is that the order can be fixed somewhere here,
384-
// but not sure. MAI.setRegisterAlias(MF,
385-
// NextInstr->getOperand(0).getReg(), Tmp);
386-
// MAI.setSkipEmission(NextInstr);
380+
MAI.setRegisterAlias(MF, NextInstr->getOperand(0).getReg(), Tmp);
381+
MAI.setSkipEmission(NextInstr);
387382
NextInstr = NextInstr->getNextNode();
388383
}
389384
} else if (TII->isTypeDeclInstr(MI) || TII->isConstantInstr(MI) ||

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

Lines changed: 6 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)