This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Adjust swdev373493.ll to remove reduced switch undef instruction
AbandonedPublic

Authored by RKSimon on Aug 20 2023, 3:35 AM.

Details

Summary

As noted on D158068 + D141895 - we should be avoiding switch undef in general (and hopfully D158068 will help prevent reductions introducing them in the future).

Based on suggestions by @arsenm

Diff Detail

Event Timeline

RKSimon created this revision.Aug 20 2023, 3:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2023, 3:35 AM
RKSimon requested review of this revision.Aug 20 2023, 3:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2023, 3:35 AM
Herald added subscribers: wangpc, wdng. · View Herald Transcript
arsenm added inline comments.Aug 20 2023, 4:59 AM
llvm/test/CodeGen/AMDGPU/swdev373493.ll
6

Should keep the hidden

17

All this new spilling is suspicious. Does it go away if you use a load from constant global variable instead of the calling convention change?

RKSimon added inline comments.Aug 21 2023, 7:39 AM
llvm/test/CodeGen/AMDGPU/swdev373493.ll
17

we seem to always spill as soon as we get rid of switch undef

RKSimon updated this revision to Diff 552013.Aug 21 2023, 7:39 AM

add back hidden attribute

arsenm accepted this revision.Aug 21 2023, 8:00 AM

I question whether this preserves the original bug but at least the original patch also added a mir test

This revision is now accepted and ready to land.Aug 21 2023, 8:00 AM

I question whether this preserves the original bug but at least the original patch also added a mir test

It doesn't. Makes sense to get rid of this test altogether now and MIR test is anyway there.

I question whether this preserves the original bug but at least the original patch also added a mir test

It doesn't. Makes sense to get rid of this test altogether now and MIR test is anyway there.

Or just leave the undef. We shouldn’t actually be purging these from every test, they still need to codegen correctly

RKSimon abandoned this revision.Aug 22 2023, 5:33 AM

abandoning before this completely sidetracks D158068