[PATCH] D59326: [ARC] Better classify add/sub immediate instructions in frame lowering.

Pete Couperus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 13:50:02 PDT 2019


petecoup created this revision.
Herald added subscribers: llvm-commits, jdoerfert, hiraditya.
Herald added a project: LLVM.

Some operations have multiple ARC instructions that are applicable.
For instance, "add r0, r0, 123" can be encoded as a "LImm" instruction
with a 32-bit immediate (8-bytes), or as a signed 12-bit immediate instruction
for the case where the source and destination register are the same (4-bytes).
The ARC assembler will choose the shortest encoding, but we should track
the correct instruction in the compiler.
This patch fixes the instruction used in some cases from ARCFrameLowering.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D59326

Files:
  llvm/lib/Target/ARC/ARCFrameLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59326.190499.patch
Type: text/x-patch
Size: 4135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190313/07dfd43b/attachment.bin>


More information about the llvm-commits mailing list