[all-commits] [llvm/llvm-project] ba78ca: [AArch64] Use DUP for BUILD_VECTOR with few differ...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Wed Oct 28 12:52:44 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ba78cae20f1467ebba6bd1005ef3e48e1fd96dee
https://github.com/llvm/llvm-project/commit/ba78cae20f1467ebba6bd1005ef3e48e1fd96dee
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-10-28 (Wed, 28 Oct 2020)
Changed paths:
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/test/CodeGen/AArch64/arm64-vector-insertion.ll
Log Message:
-----------
[AArch64] Use DUP for BUILD_VECTOR with few different elements.
If most elements of BUILD_VECTOR are the same, with a few different
elements, it is better to use DUP for the common elements and
INSERT_VECTOR_ELT for the different elements.
Currently this transform is guarded quite restrictively to only trigger
in clearly beneficial cases.
With D90176, the lowering for patterns originating from code like
` float32x4_t y = {a,a,a,0};` (common in 3D apps) are lowered even
better (unnecessary fmov is removed).
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D90233
More information about the All-commits
mailing list