For those watching, we were leaving some ssa.copy around and those arrived to the backend where we failed to lower.
The comment in the code contains the whole story, for those interested :)
Details
Diff Detail
Event Timeline
lib/Transforms/Scalar/NewGVN.cpp | ||
---|---|---|
2798–2800 | I think I could probably just forcefully cast to CallInst as we're always guaranteed that PredicateInfo will insert calls in the map, FWIW. |
(You forgot the testcase :P)
lib/Transforms/Scalar/NewGVN.cpp | ||
---|---|---|
2784 | This isn't quite right. In most cases, we are able to eliminate the ssa.copy intrinsics in eliminateInstructions.
This is the vast majority of cases. In these cases, we will end up with some ssa.copy left after and need to eliminate them. | |
2795 | I realized there's an easier way to accomplish this. // Don't replace our existing users with ourselves. if (U->get() == DominatingLeader) continue; right before this, add if (DominatingLeader is a PredicateInfo copy) DominatingLeader = copy argument |
I realized there's an easier way to accomplish this.
In eliminateInstructions,
where we have:
right before this, add