[llvm] [VectorCombine] Fold bitcast(bitreverse.v8i8(bitcast(IntTy))) into bswap+bitreverse (PR #209037)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 02:35:26 PDT 2026
================
@@ -6118,6 +6118,45 @@ bool VectorCombine::foldBitcastOfVPLoad(Instruction &I) {
/// bitreverse(bswap(x)) --> bitcast(bitreverse(bitcast(x)))
bool VectorCombine::foldBitOrderReverseAndSwap(Instruction &I) {
Value *X;
+
+ if (match(&I, m_BitCast(m_Intrinsic<Intrinsic::bitreverse>(
----------------
RKSimon wrote:
Add a brief description, also you can use PatternMatch::m_BitReverse():
```suggestion
if (match(&I, m_BitCast(m_BitReverse(
```
https://github.com/llvm/llvm-project/pull/209037
More information about the llvm-commits
mailing list