This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] When turning sext into zext due to known bits, return the new ZExt instead of calling replaceinstuseswith
ClosedPublic

Authored by craig.topper on May 8 2019, 1:31 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.May 8 2019, 1:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2019, 1:31 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
spatel accepted this revision.May 8 2019, 1:43 PM

LGTM - there are several other transforms scattered around instcombine that produce a value with the builder and then manually replace.

These are almost NFC changes, but you can show the cosmetic diffs in regression tests by re-running 'update_test_checks.py'.

This revision is now accepted and ready to land.May 8 2019, 1:43 PM
This revision was automatically updated to reflect the committed changes.