This is an archive of the discontinued LLVM Phabricator instance.

DAG: Fix assert on load casted to vector with attached range metadata
ClosedPublic

Authored by arsenm on Nov 14 2022, 10:04 AM.

Details

Summary

AMDGPU legalizes i64 loads to loads of <2 x i32>, leaving the
i64 MMO with attached range metadata alone. The known bit width
was using the scalar element type, and asserting on a mismatch.

Diff Detail

Event Timeline

arsenm created this revision.Nov 14 2022, 10:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 10:04 AM
arsenm requested review of this revision.Nov 14 2022, 10:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 10:04 AM
Herald added a subscriber: wdng. · View Herald Transcript
RKSimon added inline comments.Nov 14 2022, 10:12 AM
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
3463

is this correct for big-endian cases?

arsenm added inline comments.Nov 14 2022, 10:36 AM
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
3463

Probably not. Ideally ranges would naturally support vectors and the integer could be casted into a vector of ranges, but they don't

arsenm updated this revision to Diff 475279.Nov 14 2022, 2:29 PM

Check endianness for this hack

RKSimon accepted this revision.Nov 15 2022, 4:03 AM

LGTM

This revision is now accepted and ready to land.Nov 15 2022, 4:03 AM