[PATCH] D15730: [MachineLICM] Fix handling of memoperands
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 19:51:00 PST 2015
reames added a comment.
I'm going to move forward with the current change, but the point Sanjoy raises is entirely correct. In fact, I've already found several more instances of this same bug while digging through related code. I think we need to have three states (no memref, has memrefs, had memrefs/poison). An MI should never be able to transition backwards through those states.
I'll sent a patch out that adds that, along with some assertions in the MachineVerifier and the access APIs. I suspect they'll uncover a lot more bugs of this nature. I suspect we're not seeing this in practice just because few MIs (even patchpoints and statepoints) actually have 256 unique memory locations they touch.
More information about the llvm-commits