[all-commits] [llvm/llvm-project] 31ec72: [llvm][CodeGen] DAG Combiner folds for vscale.
Francesco Petrogalli via All-commits
all-commits at lists.llvm.org
Fri Feb 21 10:03:59 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 31ec721516b5ed36f7dbed180a903e269f29716d
https://github.com/llvm/llvm-project/commit/31ec721516b5ed36f7dbed180a903e269f29716d
Author: Francesco Petrogalli <francesco.petrogalli at arm.com>
Date: 2020-02-21 (Fri, 21 Feb 2020)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AArch64/sve-gep.ll
A llvm/test/CodeGen/AArch64/sve-vscale-combine.ll
Log Message:
-----------
[llvm][CodeGen] DAG Combiner folds for vscale.
Summary:
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)).
The test `sve-gep-ll` have been updated to reflect the folding introduced by this patch.
Reviewers: efriedma, sdesmalen, andwar, rengolin
Reviewed By: sdesmalen
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74782
More information about the All-commits
mailing list