This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Mostly fix BFI patterns
ClosedPublic

Authored by arsenm on Jan 19 2022, 11:56 AM.

Details

Reviewers
foad
Group Reviewers
Restricted Project
Summary

Most importantly, fixes constant bus errors in the 64-bit cases. It's
surprising to me these were even passing the selection test using
SReg_* sources. Also fixes pattern matching in the 32-bit cases, with
simple operands.

These patterns aren't working in a few cases, like with mixed SGPR
inputs. The patterns aren't looking through the SGPR->VGPR copies like
they need to. The vector cases also have some unmerges of build_vector
which are obscuring the inputs.

Diff Detail

Event Timeline

arsenm created this revision.Jan 19 2022, 11:56 AM
arsenm requested review of this revision.Jan 19 2022, 11:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2022, 11:56 AM
Herald added a subscriber: wdng. · View Herald Transcript
foad accepted this revision.Jan 20 2022, 2:51 AM

LGTM, thanks!

llvm/test/CodeGen/AMDGPU/bfi_int.ll
5

Could use a common prefix GFX8 for GFX8-SDAG and GFX8-GISEL, since the simple cases work out identical, and the same for GFX10?

This revision is now accepted and ready to land.Jan 20 2022, 2:51 AM