[all-commits] [llvm/llvm-project] 9a3cd0: [PatternMatch] Add matchers for `m_{I, F, }Cmp` and ...
goldsteinn via All-commits
all-commits at lists.llvm.org
Fri Jul 12 11:35:13 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a3cd0ee8f4cfa257ab22949dd709db230ef7e4f
https://github.com/llvm/llvm-project/commit/9a3cd0ee8f4cfa257ab22949dd709db230ef7e4f
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-07-13 (Sat, 13 Jul 2024)
Changed paths:
M llvm/include/llvm/IR/PatternMatch.h
M llvm/unittests/IR/PatternMatch.cpp
Log Message:
-----------
[PatternMatch] Add matchers for `m_{I,F,}Cmp` and `m_{I,F,}SpecificCmp`; NFC
These matchers either take no predicate argument or match a specific
predicate respectively.
We have a lot of cases where the Pred argument is either unused and
requiring the argument reduces code clarity.
Likewise we have a lot of cases where we only pass in Pred to test
equality which the new `*Specific*` helpers can simplify.
Closes #98282
Commit: 3cf4a508f4b929c794d46ab25b4d42bae5bbf219
https://github.com/llvm/llvm-project/commit/3cf4a508f4b929c794d46ab25b4d42bae5bbf219
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-07-13 (Sat, 13 Jul 2024)
Changed paths:
M llvm/test/Transforms/InstCombine/and-or-icmps.ll
Log Message:
-----------
[InstCombine] Add tests for transforming `(or/and (icmp eq/ne X,0),(icmp eq/ne X,Pow2OrZero))`; NFC
Commit: 52727626afb7ea702a41c1754a7d45924f9fecb2
https://github.com/llvm/llvm-project/commit/52727626afb7ea702a41c1754a7d45924f9fecb2
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-07-13 (Sat, 13 Jul 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/and-or-icmps.ll
Log Message:
-----------
[InstCombine] Add transforms for `(or/and (icmp eq/ne X,0),(icmp eq/ne X,Pow2OrZero))`
`(or (icmp eq X, 0), (icmp eq X, Pow2OrZero))`
--> `(icmp eq (and X, Pow2OrZero), X)`
`(and (icmp ne X, 0), (icmp ne X, Pow2OrZero))`
--> `(icmp ne (and X, Pow2OrZero), X)`
Proofs: https://alive2.llvm.org/ce/z/nPo2BN
Closes #94648
Compare: https://github.com/llvm/llvm-project/compare/d7fd8b19e560...52727626afb7
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