This is an archive of the discontinued LLVM Phabricator instance.

[NewGVN] Apply SimplifySelectInst if any of the options is undef.
AbandonedPublic

Authored by fhahn on Sep 11 2018, 3:36 AM.

Details

Summary

The Simplify* functions expect undefs to be replaced as we go along, to
avoid the same undef use being used with different values.

See PR33165 for an extensive discussion of the issue.

Diff Detail

Event Timeline

fhahn created this revision.Sep 11 2018, 3:36 AM
mkazantsev accepted this revision.Aug 2 2020, 10:19 PM
mkazantsev added a subscriber: mkazantsev.

Looks good. Is it still not merged? :)

This revision is now accepted and ready to land.Aug 2 2020, 10:19 PM
mkazantsev added inline comments.Aug 2 2020, 10:20 PM
test/Transforms/NewGVN/pr33165.ll
2

Please add run commant with -passes=newgvn

fhahn added a comment.Aug 5 2020, 12:34 PM

Looks good. Is it still not merged? :)

unfortunately I did not really have much time to focus on some of the outstanding NewGVN patches, but finally found some time :)

While this patch on it's own makes sense, it also hides a slightly different problem, but I think we finally have a reasonable approach to fix this other problem more generally (D84792), so I think it should be safe to also land this patch (which is an additional optimization). Thanks for taking a look!

fhahn abandoned this revision.Aug 11 2020, 7:12 AM

After d236e1c7b606c461b5cb8a8a87d50ead5d1bcbb9, the original optimizations do not trigger any more, as uses of undef are restricted. I don't think this is needed any longer.