[PATCH] D100088: [DAGCombiner] Fold step_vector with add/mul/shl

JunMa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 7 22:33:10 PDT 2021


junparser created this revision.
junparser added reviewers: david-arm, sdesmalen, paulwalker-arm, ctetreau, efriedma, kmclaughlin.
Herald added subscribers: ecnelises, hiraditya.
junparser requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch implements some DAG combines for STEP_VECTOR:
add step_vector(C1), step_vector(C2) -> step_vector(C1+C2)
add (add X step_vector(C1)), step_vector(C2) -> add X step_vector(C1+C2)
mul step_vector(C1), C2 -> step_vector(C1*C2)
shl step_vector(C1), C2 -> step_vector(C1<<C2)

TestPlan: check-llvm


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100088

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/sve-stepvector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100088.336002.patch
Type: text/x-patch
Size: 4974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210408/9d1b0b44/attachment.bin>


More information about the llvm-commits mailing list