This is an archive of the discontinued LLVM Phabricator instance.

[MIPS GlobalISel] Select andi, ori and xori
ClosedPublic

Authored by Petar.Avramovic on Nov 13 2019, 8:00 AM.

Details

Summary

Introduce IntImmLeaf version of PatLeaf immZExt16 for 32-bit immediates.
Change immZExt16 with imm32ZExt16 for andi, ori and xori.
This keeps same behavior for SDAG and allows for GlobalISel selectImpl
to select 'G_CONSTANT imm' + G_AND, G_OR, G_XOR into ANDi, ORi, XORi,
respectively, when 32-bit imm satisfies imm32ZExt16 predicate: zero
extending 16 low bits of imm is equal to imm.
Large number of test changes comes from zero extending of small types
which is transformed into 'and' with bitmask in legalizer.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2019, 8:00 AM
This revision is now accepted and ready to land.Nov 13 2019, 10:54 AM
This revision was automatically updated to reflect the committed changes.