Skip to content
Commit f6dc75cd authored by Craig Topper's avatar Craig Topper
Browse files

[RISCV] Add DAG combine to pull xor with 1 through select idiom that uses czero_eqz/nez.

If we are selecting between two setccs that need to be legalized
with xor, the select will be legalized first. Detect this pattern
so we can pull the xor through to expose it to additional
optimizations.

We could generalize this to other operations, but those normally
get handled in DAG combine before select legalization.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D156159
parent b34a8b3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment