This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix a crash when selecting a particular case of buffer_load_format_d16
ClosedPublic

Authored by jpages on May 28 2021, 2:50 PM.

Details

Summary

In this particular example, we had a crash when compiling it
for several architectures. This patch extends the legalization
of extract_subvector to avoid this problem.

Diff Detail

Event Timeline

jpages created this revision.May 28 2021, 2:50 PM
jpages requested review of this revision.May 28 2021, 2:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2021, 2:50 PM
jpages updated this revision to Diff 348857.May 31 2021, 1:01 PM
arsenm added a comment.Jun 1 2021, 6:20 AM

Should be able to simplify the testcase a lot (and it could use opt -instnamer)

llvm/test/CodeGen/AMDGPU/llvm.amdgcn.struct.buffer.load.format2.ll
6

Don't need this

10

Can strip most of these parameters

279

Don't need these

jpages updated this revision to Diff 349061.Jun 1 2021, 12:27 PM

Rebased, changed the test with bugpoint/opt to a much simpler version.

Thanks for the suggestion and sorry for the long test in the first place :)

jpages marked 3 inline comments as done.Jun 1 2021, 12:28 PM

Testname is a bit misleading since there is no format2 intrinsic

jpages updated this revision to Diff 349285.Jun 2 2021, 8:46 AM

Renamed the test file with a better name.

arsenm accepted this revision.Jun 2 2021, 8:52 AM

Probably should also add a globalisel test just in case

This revision is now accepted and ready to land.Jun 2 2021, 8:52 AM
jpages added a comment.Jun 3 2021, 2:25 PM

Probably should also add a globalisel test just in case

Because of another (I think unrelated) issue, this is unfortunately not working with global isel:

LLVM ERROR: cannot select: %34:vreg_64(<4 x s16>) = G_INSERT %66:vgpr, %7:vgpr(<3 x s16>), 0