This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Workaround some load/store type selection patterns
ClosedPublic

Authored by arsenm on Jun 9 2020, 5:46 PM.

Details

Summary

The logic is written for what loads/stores should be selectable. There
are a set of cases that should be selectable, but due to missing MVTs
and/or selection patterns, will fail to select. I think eventually
load/store select patterns should ignore the type and only look at the
value size, but until that happens, bitcast these to equivalent i32
vectors.

Diff Detail

Event Timeline

arsenm created this revision.Jun 9 2020, 5:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2020, 5:46 PM
foad added a comment.Jun 10 2020, 1:55 AM

Why does this need a command line flag? I realise it's a workaround but couldn't it still be enabled unconditionally?

Why does this need a command line flag? I realise it's a workaround but couldn't it still be enabled unconditionally?

Mostly so I don’t have to delete all the regbankselect and select tests I wrote to check the handling of these. The regbank code it supposed to be able to handle the splits of the scalar or vector multiples case

When is inst select using the legalizer anyway? Is there some risk of differences in behavior between what's being tested and the default case without the flag?

When is inst select using the legalizer anyway? Is there some risk of differences in behavior between what's being tested and the default case without the flag?

By default in a debug build the selector asserts the input instructions are legal. The failure output changes depending on this check (there is a flag to disable it which might also work in this case)

kerbowa accepted this revision.Jun 14 2020, 7:57 AM

LGTM

This revision is now accepted and ready to land.Jun 14 2020, 7:57 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir