This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Sink bin op into select if first or second value is simplified to constant
Changes PlannedPublic

Authored by xbolva00 on Apr 5 2023, 11:27 AM.

Details

Reviewers
spatel
nikic

Diff Detail

Event Timeline

xbolva00 created this revision.Apr 5 2023, 11:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 11:27 AM
xbolva00 requested review of this revision.Apr 5 2023, 11:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 11:27 AM
nikic added a comment.Apr 5 2023, 11:34 AM

Can you please regenerate checks for these files and rebase? There are lots of spurious naming diffs that make it hard to see what actually changed.

xbolva00 updated this revision to Diff 511183.Apr 5 2023, 12:23 PM

Do not perform this optimization with bools as there are infinite instcombine loops.

Can you please regenerate checks for these files and rebase? There are lots of spurious naming diffs that make it hard to see what actually changed.

Yes sure

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
924

Somehow getting infinite loops here is Xor is allowed. GDB points to foldSelectOfBools..

xbolva00 planned changes to this revision.Apr 5 2023, 12:24 PM