[llvm] [SPIR-V] Fix inconsistency between previously deduced element type of a pointer and function's return type (PR #109660)
Vyacheslav Levytskyy via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 03:03:57 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()))
----------------
VyacheslavLevytskyy wrote:
I hope not, this is only to insert ASSIGN_TYPE in a correct position. I can't devise a proper example to break with OpPhi, but if you see a case please share and I'll check.
https://github.com/llvm/llvm-project/pull/109660
More information about the llvm-commits
mailing list