[PATCH] D76994: [DAG] Fix PR45049: LegalizeTypes crash

Jonathan Roelofs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 12:30:15 PDT 2020


jroelofs marked 2 inline comments as done.
jroelofs added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h:203
+
       ValueToIdMap.erase(SDValue(Old, i));
     }
----------------
tra wrote:
> Do we need an assert at the beginning of the loop that `Old != New`? Otherwise we may be removing a valid map entry.
Good idea. I believe that would only happen for an `RAUW(N, N)`, which the `DAGUpdateListener` call sites guarantee won't happen.


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

https://reviews.llvm.org/D76994





More information about the llvm-commits mailing list