Commit f5f4825b authored by Noah Goldstein's avatar Noah Goldstein Committed by Tom Stellard
Browse files

[X86] Fix `(shift X, (xor Y, N-1))` -> `(shift X, (not Y))` by properly...

[X86] Fix `(shift X, (xor Y, N-1))` -> `(shift X, (not Y))` by properly inserting `not Y` into DAG. [#61038]

Previously not inserting the `-1` in `not Y` (`xor Y, -1`) into the
DAG. Not inserting `-1` as a DAG node comes up as a bug when doing
`(xor (shl 1, A), B)` -> `(btc A, B)`. `btc` requires `B` (dst) to be
a register.

Differential Revision: https://reviews.llvm.org/D144984

(cherry picked from commit 4a23031f)
parent da058026
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