Skip to content

Commit 5529880

Browse files
committed
SPIRV: Set NoPHIs property after selection
There should be no PHIs after selection, as OpPhi is used instead. This hopefully avoids errors in #135277.
1 parent 0fdb908 commit 5529880

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ class SPIRVInstructionSelect : public InstructionSelect {
269269
return InstructionSelect::getRequiredProperties().reset(
270270
MachineFunctionProperties::Property::RegBankSelected);
271271
}
272+
273+
MachineFunctionProperties getClearedProperties() const override {
274+
// No generic Phis remain, replaced with OpPhi
275+
return InstructionSelect::getClearedProperties().reset(
276+
MachineFunctionProperties::Property::NoPHIs);
277+
}
272278
};
273279
} // namespace
274280

0 commit comments

Comments
 (0)