[llvm] [Reg2Mem] Handle CallBr instructions (PR #90953)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat May 4 00:07:21 PDT 2024


================
@@ -102,9 +102,12 @@ AllocaInst *llvm::DemoteRegToStack(Instruction &I, bool VolatileLoads,
         new StoreInst(&I, Slot, Handler->getFirstInsertionPt());
       return Slot;
     }
+  } else if (InvokeInst *II = dyn_cast<InvokeInst>(&I)) {
+    InsertPt = II->getNormalDest()->getFirstInsertionPt();
+  } else if (CallBrInst *CBI = dyn_cast<CallBrInst>(&I)) {
+    InsertPt = CBI->getDefaultDest()->getFirstInsertionPt();
----------------
nikic wrote:

This used to be the case, but the limitation no longer exists. Looks like we forgot to drop this note in LangRef.

https://github.com/llvm/llvm-project/pull/90953


More information about the llvm-commits mailing list