This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Don't mis-select vector index on a constant
ClosedPublic

Authored by arsenm on Feb 6 2020, 2:21 PM.

Details

Reviewers
kerbowa
nhaehnle
Summary

Vector indexing with a constant index should be folded out in the
legalizer, but this was accidentally falling through. This would
produce the indexing operation with $noreg. Handle this case as a
dynamic index just in of a future bug like this happens again.

Diff Detail

Event Timeline

arsenm created this revision.Feb 6 2020, 2:21 PM
kerbowa added inline comments.Feb 8 2020, 10:57 PM
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
1967

Can this just assert?

arsenm marked an inline comment as done.Feb 9 2020, 2:28 PM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
1967

The point is to not assert or crash. We can handle this here, so it should just work

kerbowa accepted this revision.Feb 9 2020, 2:52 PM

LGTM

This revision is now accepted and ready to land.Feb 9 2020, 2:52 PM