Page MenuHomePhabricator

[MIPS GlobalISel] Select addiu

Authored by Petar.Avramovic on Nov 13 2019, 7:58 AM.



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.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2019, 7:58 AM
atanasyan accepted this revision.Nov 13 2019, 10:53 AM



It's unrelated to this patch but probably this comment should say about "8-bit sign extended".

This revision is now accepted and ready to land.Nov 13 2019, 10:53 AM
This revision was automatically updated to reflect the committed changes.