This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Fix width value for G_SBFX/G_UBFX
ClosedPublic

Authored by bcahoon on Apr 29 2021, 9:20 AM.

Details

Summary

When creating G_SBFX/G_UBFX opcodes, specify the last operand
as a width instead of the bit position. The bit position is used for
the AArch64 SBFM and UBFM instructions. Then, the bit position
is converted to a width if the SBFX/UBFX aliases are generated, but
the bit position is used for creating other aliases, such as the shifts.

See https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-sbfx-g-ubfx
for the opcode definition.

Diff Detail

Event Timeline

bcahoon created this revision.Apr 29 2021, 9:20 AM
bcahoon requested review of this revision.Apr 29 2021, 9:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2021, 9:20 AM
This revision is now accepted and ready to land.Apr 29 2021, 10:36 AM
This revision was landed with ongoing or failed builds.Apr 29 2021, 7:05 PM
This revision was automatically updated to reflect the committed changes.