[all-commits] [llvm/llvm-project] e3444a: [InstCombine] Add tests for expanding `foldICmpWit...
goldsteinn via All-commits
all-commits at lists.llvm.org
Sun Mar 10 12:34:09 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3444ad0bd758ea1c8f67425063f8b53afe3d7de
https://github.com/llvm/llvm-project/commit/e3444ad0bd758ea1c8f67425063f8b53afe3d7de
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-03-10 (Sun, 10 Mar 2024)
Changed paths:
A llvm/test/Transforms/InstCombine/icmp-and-lowbit-mask.ll
Log Message:
-----------
[InstCombine] Add tests for expanding `foldICmpWithLowBitMaskedVal`; NFC
Differential Revision: https://reviews.llvm.org/D159057
Commit: f89e4e339f31ad331aeab9a35183bc75bc42f2b6
https://github.com/llvm/llvm-project/commit/f89e4e339f31ad331aeab9a35183bc75bc42f2b6
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-03-10 (Sun, 10 Mar 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Log Message:
-----------
[InstCombine] Move `foldICmpWithLowBitMaskedVal` to `foldICmpCommutative`; NFC
Commit: d77eb9ea598f6e56a583eac40f95ca59b3130523
https://github.com/llvm/llvm-project/commit/d77eb9ea598f6e56a583eac40f95ca59b3130523
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-03-10 (Sun, 10 Mar 2024)
Changed paths:
M llvm/include/llvm/IR/PatternMatch.h
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-eq-to-icmp-ule.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-sge-to-icmp-sle.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-sgt-to-icmp-sgt.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-sle-to-icmp-sle.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-slt-to-icmp-sgt.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-uge-to-icmp-ule.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ugt-to-icmp-ugt.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ule-to-icmp-ule.ll
M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ult-to-icmp-ugt.ll
M llvm/test/Transforms/InstCombine/icmp-and-lowbit-mask.ll
M llvm/unittests/IR/PatternMatch.cpp
Log Message:
-----------
[InstCombine] Improve mask detection in `foldICmpWithLowBitMaskedVal`
Make recursive matcher that is able to detect a lot more patterns.
Proofs for all supported patterns: https://alive2.llvm.org/ce/z/fSQ3nZ
Differential Revision: https://reviews.llvm.org/D159058
Commit: 193b3d6733b7bf606c70749b1b65b6a0daae97d5
https://github.com/llvm/llvm-project/commit/193b3d6733b7bf606c70749b1b65b6a0daae97d5
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-03-10 (Sun, 10 Mar 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/icmp-and-lowbit-mask.ll
M llvm/test/Transforms/InstCombine/lshr-and-negC-icmpeq-zero.ll
M llvm/test/Transforms/InstCombine/lshr-and-signbit-icmpeq-zero.ll
M llvm/test/Transforms/InstCombine/shl-and-negC-icmpeq-zero.ll
M llvm/test/Transforms/InstCombine/shl-and-signbit-icmpeq-zero.ll
Log Message:
-----------
[InstCombine] Recognize `(icmp eq/ne (and X, ~Mask), 0)` pattern in `foldICmpWithLowBitMaskedVal`
`(icmp eq/ne (and X, ~Mask), 0)` is equivilent to `(icmp eq/ne (and X,
Mask), X` and we sometimes generate the former pattern intentionally
to reduce number of uses of `X`.
Proof: https://alive2.llvm.org/ce/z/3u-usC
Differential Revision: https://reviews.llvm.org/D159329
Closes #81562
Compare: https://github.com/llvm/llvm-project/compare/8a790033073e...193b3d6733b7
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list