[PATCH] D74782: [llvm][CodeGen] DAG Combiner folds for vscale.
Francesco Petrogalli via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 11:30:17 PST 2020
fpetrogalli created this revision.
fpetrogalli added reviewers: efriedma, sdesmalen, andwar.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This patch simplifies the DAGs generated when using the intrinsic
`@llvm.vscale.*` as follows:
- Fold (add (vscale * C0), (vscale * C1)) to (vscale * C0 + C1)).
- Canonicalize (sub X, (vscale * C)) to (add X, (vscale * -C)).
- Fold (mul (vscale * C0), C1) to (vscale * (C0 * C1))).
- Fold (shl (vscale * C0), C1) to (vscale * (C0 << C1))).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74782
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/sve-vscale-combine.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74782.245217.patch
Type: text/x-patch
Size: 5127 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200218/3ff247c3/attachment.bin>
More information about the llvm-commits
mailing list