This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GlobalISel] Compute known bits for zero-extending loads
ClosedPublic

Authored by foad on Oct 13 2020, 6:51 AM.

Details

Summary

Implement computeKnownBitsForTargetInstr for G_AMDGPU_BUFFER_LOAD_UBYTE
and G_AMDGPU_BUFFER_LOAD_USHORT. This allows generic combines to remove
some unnecessary G_ANDs.

Diff Detail

Event Timeline

foad created this revision.Oct 13 2020, 6:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2020, 6:51 AM
foad requested review of this revision.Oct 13 2020, 6:51 AM
arsenm accepted this revision.Oct 13 2020, 7:37 AM
This revision is now accepted and ready to land.Oct 13 2020, 7:37 AM

This could do better by checking the range metadata on the memory operand, but I don't think that's wired into the IR->MIR lowering now (if we ever even attach this to intrinsic calls)

This revision was landed with ongoing or failed builds.Oct 13 2020, 8:22 AM
This revision was automatically updated to reflect the committed changes.