Unverified Commit cf47af49 authored by Nikita Popov's avatar Nikita Popov Committed by GitHub
Browse files

[InstCombine] Generalize folds for inversion of icmp operands (#74317)

We have a bunch of folds that basically perform X pred Y to ~Y pred ~X
for various special cases where this saves an instruction.

Generalize these folds to use isFreeToInvert(). We have to make sure
that we consume an instruction in either of the inversions, otherwise
we're just going to swap the icmp back and forth.

Fixes https://github.com/llvm/llvm-project/issues/74302.
parent d0d5ef81
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment