[llvm] [IR] Fix nested constant to instruction conversion (PR #69682)
Wenju He via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 20 01:09:05 PDT 2023
================
@@ -85,9 +90,11 @@ bool convertUsersOfConstantsToInstructions(ArrayRef<Constant *> Consts) {
if (auto *C = dyn_cast<Constant>(U.get())) {
if (ExpandableUsers.contains(C)) {
Changed = true;
- Instruction *NI = expandUser(BI, C);
- InstructionWorklist.insert(NI);
- U.set(NI);
+ auto NewInsts = expandUser(BI, C);
+ for (auto *NI : NewInsts)
+ NI->setDebugLoc(BI->getDebugLoc());
----------------
wenju-he wrote:
Thank you for the review. I didn't notice this problem. I've updated to use debug loc from the original inst
https://github.com/llvm/llvm-project/pull/69682
More information about the llvm-commits
mailing list