[PATCH] D84964: [WIP] Demo a functional problem from D81647 with a fix and test case

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 11:33:43 PDT 2020


dantrushin added a comment.

I will incorporate this into D81647 <https://reviews.llvm.org/D81647>, since fix will be even simpler there.



================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:238
         ++CurOpIdx;
+        if (MO.isDef())
+          WrittenSlotIndices.insert(FI);
----------------
Defs are never seen here by construction of `OpsToSpill`


================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:248
+    for (MachineOperand &MO : MI.operands())
+      if (MO.isReg() && !MO.isImplicit() && MO.isDef() &&
+          RegToSlotIdx.count(MO.getReg()))
----------------
Can iterate over `MI.defs()` (not `operands()`) and delete these checks


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84964/new/

https://reviews.llvm.org/D84964



More information about the llvm-commits mailing list