[all-commits] [llvm/llvm-project] f5f482: [X86] Fix `(shift X, (xor Y, N-1))` -> `(shift X, ...
goldsteinn via All-commits
all-commits at lists.llvm.org
Fri Mar 3 23:54:09 PST 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: f5f4825b189ccb016e01a9cd10e2a06cd8f2a89a
https://github.com/llvm/llvm-project/commit/f5f4825b189ccb016e01a9cd10e2a06cd8f2a89a
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
A llvm/test/CodeGen/X86/pr61038.ll
Log Message:
-----------
[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 4a23031fac1a58f6cf05d07f915633930532eafa)
More information about the All-commits
mailing list