[all-commits] [llvm/llvm-project] 4ac158: [InstCombine] Add tests for combining `(icmp eq/ne...
goldsteinn via All-commits
all-commits at lists.llvm.org
Mon Jun 10 11:00:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4ac158e04c2eb693fba81bcc2e728208104af71d
https://github.com/llvm/llvm-project/commit/4ac158e04c2eb693fba81bcc2e728208104af71d
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-06-10 (Mon, 10 Jun 2024)
Changed paths:
M llvm/test/Transforms/InstCombine/and-compare.ll
Log Message:
-----------
[InstCombine] Add tests for combining `(icmp eq/ne (and X, P2), (and X, -P2))`; NFC
Commit: 77f75b45fd8a4bbc061e85a4432c23b64ca7d4f2
https://github.com/llvm/llvm-project/commit/77f75b45fd8a4bbc061e85a4432c23b64ca7d4f2
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-06-10 (Mon, 10 Jun 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/and-compare.ll
Log Message:
-----------
[InstCombine] Extend `(icmp eq/ne (and Z, X), (and Z, Y))` folds
Two ways to relaxed:
1) Only require one of the `and` ops to be single-use if both `X`
and `Y` are constant.
2) Special case, if `X ^ Y` is a negative power of 2, then
`Z ^ NegP2 ==/!= 0` will fold to `Z u</u>= -NegP2` which
creates no additional instructions so fold irrelivant of
use counts.
Closes #94867
Compare: https://github.com/llvm/llvm-project/compare/93b91ddddd03...77f75b45fd8a
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