[llvm] [SPIR-V] Fix inconsistency between previously deduced element type of a pointer and function's return type (PR #109660)
Nathan Gauër via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 02:39:59 PDT 2024
================
@@ -341,6 +341,17 @@ createNewIdReg(SPIRVType *SpvType, Register SrcReg, MachineRegisterInfo &MRI,
return {Reg, GetIdOp};
}
+static void setInsertPtAfterDef(MachineIRBuilder &MIB, MachineInstr *Def) {
+ MachineBasicBlock &MBB = *Def->getParent();
+ MachineBasicBlock::iterator DefIt =
+ Def->getNextNode() ? Def->getNextNode()->getIterator() : MBB.end();
+ // Skip all the PHI and debug instructions.
+ while (DefIt != MBB.end() &&
+ (DefIt->isPHI() || DefIt->isDebugOrPseudoInstr()))
----------------
Keenuts wrote:
perfect!
https://github.com/llvm/llvm-project/pull/109660
More information about the llvm-commits
mailing list