[PATCH] D66805: [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 11:01:17 PDT 2019


lebedev.ri updated this revision to Diff 217436.
lebedev.ri retitled this revision from "[MIPS] For vectors, select `add %x, -1` as `sub %x, 1`" to "[MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate".
lebedev.ri added a comment.

Generalize the check, do not limit the transform to `-1` specifically,
but rather all splat immediates if negating results in inline immediate (5-bit unsigned)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66805/new/

https://reviews.llvm.org/D66805

Files:
  llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
  llvm/lib/Target/Mips/MipsISelDAGToDAG.h
  llvm/test/CodeGen/Mips/msa/arithmetic.ll
  llvm/test/CodeGen/Mips/msa/i5-s.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66805.217436.patch
Type: text/x-patch
Size: 5086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190827/2cc3dc1c/attachment.bin>


More information about the llvm-commits mailing list