[llvm] [CodeGen] Fix incorrect rematerialization rollback order (PR #197576)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 06:24:05 PDT 2026


================
@@ -514,6 +511,12 @@ class Rematerializer {
 /// rematerializations as soon as it is attached to the rematerializer.
 class LLVM_ABI Rollbacker : public Rematerializer::Listener {
 public:
+  /// An insertion position pointer in the MIR.
+  union InsertPosPtr {
+    MachineInstr *MI;
+    MachineBasicBlock *MBB;
+  };
----------------
arsenm wrote:

Why not MachineBasicBlock + MachineBasicBlock::iterator? There's probably already a utility for that 

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


More information about the llvm-commits mailing list