[all-commits] [llvm/llvm-project] 8f262a: [AArch64][GlobalISel] Move dup optimization into p...
Jessica Paquette via All-commits
all-commits at lists.llvm.org
Fri Jun 5 17:46:58 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 8f262a686e5ecd25552d6992bbccb08a8f5c3f26
https://github.com/llvm/llvm-project/commit/8f262a686e5ecd25552d6992bbccb08a8f5c3f26
Author: Jessica Paquette <jpaquette at apple.com>
Date: 2020-06-05 (Fri, 05 Jun 2020)
Changed paths:
M llvm/lib/Target/AArch64/AArch64Combine.td
M llvm/lib/Target/AArch64/AArch64InstrGISel.td
M llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp
M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
M llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
R llvm/test/CodeGen/AArch64/GlobalISel/opt-shuffle-splat.mir
A llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-shuffle-splat.mir
A llvm/test/CodeGen/AArch64/GlobalISel/regbank-dup.mir
A llvm/test/CodeGen/AArch64/GlobalISel/select-dup.mir
Log Message:
-----------
[AArch64][GlobalISel] Move dup optimization into post-legalizer combiner
Since all of the other G_SHUFFLE_VECTOR transforms are going there, let's do
this with dup as well. This is nice, because it lets us split up the original
code into matching, register bank selection, and instruction selection.
- Create G_DUP, make it equivalent to AArch64dup
- Add a post-legalizer combine which is 90% a copy-and-paste from
tryOptVectorDup, except with shuffle matching closer to what SelectionDAG
does in `ShuffleVectorSDNode::isSplatMask`.
- Teach RegBankSelect about G_DUP. Since dup selection relies on the correct
register bank for FP/GPR dup selection, this is necessary.
- Kill `tryOptVectorDup`, since it's now entirely handled by G_DUP.
- Add testcases for the combine, RegBankSelect, and selection. The selection
test gives the same selection results as the old test.
Differential Revision: https://reviews.llvm.org/D81221
More information about the All-commits
mailing list