This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add tests for deducing constants based on condition in select; NFC
ClosedPublic

Authored by goldstein.w.n on Apr 12 2023, 4:03 PM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Apr 12 2023, 4:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 4:03 PM
goldstein.w.n requested review of this revision.Apr 12 2023, 4:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 4:03 PM
nikic accepted this revision.Apr 13 2023, 12:30 AM

LGTM

llvm/test/Transforms/InstCombine/binop-select.ll
81

Maybe add one more (negative) test with the select ops swapped, so we know the constant in the call but not the one in the select.

This revision is now accepted and ready to land.Apr 13 2023, 12:30 AM

Add negative test

goldstein.w.n marked an inline comment as done.Apr 14 2023, 9:53 AM