[PATCH] D70184: [MIPS GlobalISel] Select addiu

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 07:59:13 PST 2019


Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: atanasyan, petarj.
Herald added subscribers: llvm-commits, jrtc27, hiraditya, arichardson, rovka, sdardis.
Herald added a project: LLVM.

Introduce IntImmLeaf version of PatLeaf immSExt16 for 32-bit immediates.
Change immSExt16 with imm32SExt16 for addiu.
This keeps same behavior for SDAG and allows for GlobalISel selectImpl
to select 'G_CONSTANT imm' + G_ADD into ADDIu when 32-bit imm satisfies
imm32SExt16 predicate: sign extending 16 low bits of imm is equal to imm.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70184

Files:
  llvm/lib/Target/Mips/MipsInstrInfo.td
  llvm/test/CodeGen/Mips/GlobalISel/instruction-select/add.mir
  llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/add.ll
  llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70184.229101.patch
Type: text/x-patch
Size: 5574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191113/f5b3d746/attachment.bin>


More information about the llvm-commits mailing list