[llvm] [AArch64] Replace AND with LSL#2 for LDR target (#34101) (PR #89531)
Justin Fargnoli via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 15:13:28 PDT 2024
================
@@ -9893,7 +9894,8 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
// folding this will increase the total number of instructions.
if (N0.getOpcode() == ISD::SRL &&
(N0.getOperand(1) == N1 || N0.hasOneUse()) &&
- TLI.shouldFoldConstantShiftPairToMask(N, Level)) {
+ TLI.shouldFoldConstantShiftPairToMask(N, Level) &&
+ !isCanBeLoadedWithLsl(N)) {
----------------
justinfargnoli wrote:
Why not move the call to `isCanBeLoadedWithLsl()` outside of `SelectionDAG` and into the `aarch64` target?
https://github.com/llvm/llvm-project/pull/89531
More information about the llvm-commits
mailing list