diff options
author | Noah Goldstein <goldstein.w.n@gmail.com> | 2023-02-22 18:36:49 -0600 |
---|---|---|
committer | Noah Goldstein <goldstein.w.n@gmail.com> | 2023-02-24 15:22:09 -0600 |
commit | f35e3fa53bb7173a8f8ccda8eb017a7ccd986800 (patch) | |
tree | 66cab11e16cbe9f637c0c3aae1da8b87edb281a7 /llvm/lib/Support/PrettyStackTrace.cpp | |
parent | 890eb4f0a150bce6e4057e946b8d9c0ba5f811fe (diff) | |
download | llvm-f35e3fa53bb7173a8f8ccda8eb017a7ccd986800.zip llvm-f35e3fa53bb7173a8f8ccda8eb017a7ccd986800.tar.gz llvm-f35e3fa53bb7173a8f8ccda8eb017a7ccd986800.tar.bz2 |
Add transforms for `(max/min (xor X, Pow2), X)` -> `(and/or X, Pow2/~Pow2)`
X ^ Pow2 is guranteed to flip one bit. We can use this to speedup
max/min by just selecting X with/without (or/andnot) the flipped bit
respectively.
Alive2 Links:
smax-neg: https://alive2.llvm.org/ce/z/j3QYFs
smin-neg: https://alive2.llvm.org/ce/z/bFYnQW
smax-pos: https://alive2.llvm.org/ce/z/4xYSxR
smin-pos: https://alive2.llvm.org/ce/z/H3RPKj
umax : https://alive2.llvm.org/ce/z/P4oRcX
umin : https://alive2.llvm.org/ce/z/vWZG6p
Differential Revision: https://reviews.llvm.org/D144606
Diffstat (limited to 'llvm/lib/Support/PrettyStackTrace.cpp')
0 files changed, 0 insertions, 0 deletions