This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Allow different tyeps for G_SBFX and G_UBFX operands
ClosedPublic

Authored by bcahoon on Apr 1 2021, 9:07 AM.

Details

Summary

Change the definition of G_SBFX and G_UBFX so that the lsb and width
can have different types than the src and dst operands.

Diff Detail

Event Timeline

bcahoon created this revision.Apr 1 2021, 9:07 AM
bcahoon requested review of this revision.Apr 1 2021, 9:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2021, 9:07 AM
arsenm added a comment.Apr 1 2021, 9:11 AM

Description is misleading. This should be allow a different type for the offset/width operands, which do not necessarily need to be constant

llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
718

Maybe this should keep using i64 for the amounts? It probably doesn't really matter since it only handles constant cases

bcahoon updated this revision to Diff 334791.Apr 1 2021, 12:13 PM
bcahoon retitled this revision from [GlobalISel] Use i32 values for lsb and width with G_SBFX and G_UBFX to [GlobalISel] Allow different tyeps for G_SBFX and G_UBFX operands.
bcahoon edited the summary of this revision. (Show Details)

Keep operand types for lsb and width to be the same type as the src/dst for AArch64.

arsenm accepted this revision.Apr 1 2021, 12:46 PM

Typo tyeps in commit message

This revision is now accepted and ready to land.Apr 1 2021, 12:46 PM
paquette accepted this revision.Apr 1 2021, 3:20 PM

LGTM

This revision was landed with ongoing or failed builds.Apr 2 2021, 8:15 AM
This revision was automatically updated to reflect the committed changes.