This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GlobalISel] Fix lowerShlSat
ClosedPublic

Authored by mbrkusanin on Nov 13 2020, 9:04 AM.

Details

Summary

RegBankSelect would crash on G_SELECT when type is not s1.

Diff Detail

Event Timeline

mbrkusanin created this revision.Nov 13 2020, 9:04 AM
mbrkusanin requested review of this revision.Nov 13 2020, 9:04 AM
arsenm added inline comments.Nov 13 2020, 9:11 AM
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
6076

BoolTy?

llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sshlsat.mir
221

I'm surprised there are this many changes

foad added inline comments.Nov 13 2020, 9:14 AM
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
6076

Use BoolTy here. Otherwise it won't work for vector types.

mbrkusanin added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sshlsat.mir
221

Previous MIR still had G_SSHLSAT. And most these new shifts end up dead immediately.

arsenm accepted this revision.Nov 16 2020, 8:41 AM
This revision is now accepted and ready to land.Nov 16 2020, 8:41 AM
This revision was automatically updated to reflect the committed changes.