[PATCH] D129290: [DAG] SimplifyDemandedBits - fold AND(INSERT_SUBVECTOR(C,X,I),M) -> INSERT_SUBVECTOR(AND(C,M),X,I)
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 07:58:35 PDT 2022
- Previous message: [PATCH] D129290: [DAG] SimplifyDemandedBits - fold AND(INSERT_SUBVECTOR(C,X,I),M) -> INSERT_SUBVECTOR(AND(C,M),X,I)
- Next message: [PATCH] D129290: [DAG] SimplifyDemandedBits - fold AND(INSERT_SUBVECTOR(C,X,I),M) -> INSERT_SUBVECTOR(AND(C,M),X,I)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
deadalnix added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1366
+ // AND(INSERT_SUBVECTOR(C,X,I),M) -> INSERT_SUBVECTOR(AND(C,M),X,I)
+ // iff AND(X,M) == X (for DemandedBits).
+ if (Op0.getOpcode() == ISD::INSERT_SUBVECTOR &&
----------------
RKSimon wrote:
> deadalnix wrote:
> > This sound like a reasonable transform, however, that might push an and in the middle of an `INSERT_SUBVECTOR` chain. Won't that be a problem?
> no chain - the base vector is checked to be undef / constant
Obviously! Go for it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129290/new/
https://reviews.llvm.org/D129290
- Previous message: [PATCH] D129290: [DAG] SimplifyDemandedBits - fold AND(INSERT_SUBVECTOR(C,X,I),M) -> INSERT_SUBVECTOR(AND(C,M),X,I)
- Next message: [PATCH] D129290: [DAG] SimplifyDemandedBits - fold AND(INSERT_SUBVECTOR(C,X,I),M) -> INSERT_SUBVECTOR(AND(C,M),X,I)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list