[PATCH] D66805: [MIPS] For vectors, select `add %x, -1` as `sub %x, 1`
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 08:22:17 PDT 2019
lebedev.ri created this revision.
lebedev.ri added reviewers: atanasyan, Petar.Avramovic, RKSimon.
lebedev.ri added a project: LLVM.
Herald added subscribers: jrtc27, hiraditya, arichardson, sdardis.
lebedev.ri added a parent revision: D62341: [DAGCombine][X86][AArch64][AMDGPU][MIPS][PPC] (sub x, c) -> (add x, -c) vector edition..
As discussed in https://reviews.llvm.org/D62341#1515637,
for MIPS `add %x, -1` isn't optimal. Unlike X86 there
are no fastpaths to matearialize such `-1`/`1` vector constants,
and `sub %x, 1` results in better codegen,
so undo canonicalization
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66805
Files:
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
llvm/lib/Target/Mips/MipsISelDAGToDAG.h
llvm/test/CodeGen/Mips/msa/arithmetic.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66805.217410.patch
Type: text/x-patch
Size: 5835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190827/3a882191/attachment.bin>
More information about the llvm-commits
mailing list