[all-commits] [llvm/llvm-project] cb80fa: [VectorCombine] Support pattern `bitop(bitcast(x), ...
XChy via All-commits
all-commits at lists.llvm.org
Tue Sep 2 08:54:33 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cb80fa756c4fcbc4f5deba16da857ed309e044cf
https://github.com/llvm/llvm-project/commit/cb80fa756c4fcbc4f5deba16da857ed309e044cf
Author: XChy <xxs_chy at outlook.com>
Date: 2025-09-02 (Tue, 02 Sep 2025)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
M llvm/test/Transforms/VectorCombine/X86/bitop-of-castops.ll
Log Message:
-----------
[VectorCombine] Support pattern `bitop(bitcast(x), C) -> bitcast(bitop(x, InvC))` (#155216)
Resolves #154797.
This patch adds the fold `bitop(bitcast(x), C) -> bitop(bitcast(x),
cast(InvC)) -> bitcast(bitop(x, InvC))`.
The helper function `getLosslessInvCast` tries to calculate the constant
`InvC`, satisfying `castop(InvC) == C`, and will try its best to keep
the poison-generated flags of the cast operation.
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