This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix handling of alignment padding in DAG argument lowering
ClosedPublic

Authored by arsenm on Jul 5 2018, 9:35 AM.

Details

Summary

This was completely broken if there was ever a struct argument, as
this information is thrown away during the argument analysis.

The offsets as passed in to LowerFormalArguments are not useful,
as they partially depend on the legalized result register type,
and they don't consider the alignment in the first place.

Ignore the Ins array, and instead figure out from the raw IR type
what we need to do. This seems to fix the padding computation
if the DAG lowering is forced (and stops breaking arguments
following padded arguments if the arguments were only partially
lowered in the IR)

Diff Detail

Event Timeline

arsenm created this revision.Jul 5 2018, 9:35 AM
This revision is now accepted and ready to land.Jul 12 2018, 10:44 AM
arsenm closed this revision.Jul 13 2018, 9:45 AM

r337021