Skip to content

Commit 3dc3d43

Browse files
authored
SPIRV: Simplify phi processing (#137050)
1 parent d68c732 commit 3dc3d43

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,9 +2019,7 @@ static void patchPhis(const Module &M, SPIRVGlobalRegistry *GR,
20192019
if (!MF)
20202020
continue;
20212021
for (auto &MBB : *MF) {
2022-
for (MachineInstr &MI : MBB) {
2023-
if (MI.getOpcode() != TargetOpcode::PHI)
2024-
continue;
2022+
for (MachineInstr &MI : MBB.phis()) {
20252023
MI.setDesc(TII.get(SPIRV::OpPhi));
20262024
Register ResTypeReg = GR->getSPIRVTypeID(
20272025
GR->getSPIRVTypeForVReg(MI.getOperand(0).getReg(), MF));

0 commit comments

Comments
 (0)