This is an archive of the discontinued LLVM Phabricator instance.

LegalizeDAG: Don't replace vector load with integer unless legal
ClosedPublic

Authored by arsenm on Feb 12 2016, 3:55 PM.

Details

Summary

On AMDGPU we want to be able to promote i64/f64 loads to v2i32.
If the access is unaligned, this would conclude that since i64 is legal,
it would convert it back to i64 and there is an endless legalization
loop.

Extract the logic for scalarizing the load into a new TargetLowering
function, where this can also replace the custom function AMDGPU
has for this.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 47870.Feb 12 2016, 3:55 PM
arsenm retitled this revision from to LegalizeDAG: Don't replace vector load with integer unless legal.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
resistor edited edge metadata.Mar 21 2016, 11:02 AM

Code change is fine, but I would like to see a doxygen comment for scalarizeVectorLoad()

arsenm updated this revision to Diff 51208.Mar 21 2016, 11:59 AM
arsenm edited edge metadata.

Add comment

resistor accepted this revision.Mar 29 2016, 12:35 PM
resistor edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 29 2016, 12:35 PM
arsenm closed this revision.Mar 30 2016, 2:20 PM

r264927