This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Remove the undef-related workaround code in visitSelectInst
ClosedPublic

Authored by aqjune on Apr 25 2022, 6:07 PM.

Details

Summary

This patch removes an old hack in visitSelectInst that was written to avoid miscompilation bugs in loop unswitch.
(Added via https://reviews.llvm.org/D35811)

The legacy loop unswitch pass will be removed after D124376, and the new simple loop unswitch pass correctly uses freeze to avoid introducing UB after D124252.

Since the hack is not necessary anymore, this patch removes it.

Diff Detail

Event Timeline

aqjune created this revision.Apr 25 2022, 6:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 6:07 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
aqjune requested review of this revision.Apr 25 2022, 6:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 6:07 PM

Can you please add a test in InstCombine for the fold this now allows?

aqjune updated this revision to Diff 425460.Apr 27 2022, 3:09 AM

Yep, a test added

nikic accepted this revision.Apr 27 2022, 3:45 AM

LGTM

This revision is now accepted and ready to land.Apr 27 2022, 3:45 AM
This revision was landed with ongoing or failed builds.Apr 30 2022, 4:52 AM
This revision was automatically updated to reflect the committed changes.