[PATCH] D118264: [DAG] SelectionDAG::getNode(N1,N2) - detect N2 constant vector splats as well as scalars

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 11:43:22 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/neon-bitwise-instructions.ll:825
 ; CHECK-NEXT:    and v0.8b, v0.8b, v1.8b
-; CHECK-NEXT:    orr v0.2s, #0
 ; CHECK-NEXT:    ret
----------------
Checking my understanding. This happened before because vselect expansion created twos Ands and an Or. One of the Ands constant folded immediately. Then custom legalization for Or created a special AArch64ISD::ORRi. This all occurred inside of legalize vector ops.

There's no DAG combine for AArch64ISD::ORRi to catch this after legalize vector ops.

Your patch fixes this because the Or will be simplified when it is created.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118264/new/

https://reviews.llvm.org/D118264



More information about the llvm-commits mailing list