This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/R600: Use correct number of vector elements when lowering private loads
ClosedPublic

Authored by jvesely on May 6 2016, 2:14 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

jvesely updated this revision to Diff 56461.May 6 2016, 2:14 PM
jvesely retitled this revision from to AMDGPU/R600: Use correct number of vector elements when lowering private loads.
jvesely updated this object.
jvesely added a reviewer: tstellarAMD.
jvesely set the repository for this revision to rL LLVM.
jvesely added subscribers: llvm-commits, arsenm.
arsenm added inline comments.May 6 2016, 2:41 PM
lib/Target/AMDGPU/R600ISelLowering.cpp
1664 ↗(On Diff #56461)

Why is this being hit for > 4 elements? Those should have been split up during type legalization already by the time it reaches here

jvesely added inline comments.May 6 2016, 6:08 PM
lib/Target/AMDGPU/R600ISelLowering.cpp
1664 ↗(On Diff #56461)

You're right, it's not. I realized it during testing. Keeping SDValue [4] and using makeArrayRef(Loads, NumElementVT) works too. SmallVector seemed a bit more robust.

jvesely added inline comments.May 13 2016, 5:24 AM
lib/Target/AMDGPU/R600ISelLowering.cpp
1664 ↗(On Diff #56461)

would you prefer if I changed the approach to makeArrayRef, or removed the v16 tests from this patch?

jvesely updated this revision to Diff 57386.May 16 2016, 12:50 PM

adapt tests to changed MaxPrivateElementSize (r269145)

arsenm added inline comments.May 16 2016, 3:11 PM
lib/Target/AMDGPU/R600ISelLowering.cpp
1680 ↗(On Diff #57386)

More tests is good. makeArrayRef would probably be better

jvesely updated this revision to Diff 57422.May 16 2016, 4:47 PM

switch to makeArrayRef

another rebase

jvesely marked an inline comment as done.May 16 2016, 4:48 PM
arsenm accepted this revision.May 16 2016, 4:48 PM
arsenm added a reviewer: arsenm.

LGTM

This revision is now accepted and ready to land.May 16 2016, 4:48 PM
This revision was automatically updated to reflect the committed changes.