]> granicus.if.org Git - llvm/commit
[DebugInfo] Handle endianness when moving debug info for split integer values (reapplied)
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 3 Oct 2017 11:03:02 +0000 (11:03 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 3 Oct 2017 11:03:02 +0000 (11:03 +0000)
commitb0c3c28f198f2ba37e96579cd525be57887251b4
tree98e16476909fb7aa117270a7e56731cc03c27635
parent4bdc127326dabb050244a23c900fdfdd8a9d0a31
[DebugInfo] Handle endianness when moving debug info for split integer values (reapplied)

Summary:
Take the target's endianness into account when splitting the
debug information in DAGTypeLegalizer::SetExpandedInteger.

This patch fixes so that, for big-endian targets, the fragment
expression corresponding to the high part of a split integer
value is placed at offset 0, in order to correctly represent
the memory address order.

I have attached a PPC32 reproducer where the resulting DWARF
pieces for a 64-bit integer were incorrectly reversed.

Original patch was reverted due to using -stop-after=isel in
the test case (but that is only working when AMDGPU target
is included in the llc build). The test case has now been
updated to use -stop-before=expand-isel-pseudos instead.

Patch by: dstenb

Reviewers: JDevlieghere, aprantl, dblaikie

Reviewed By: JDevlieghere, aprantl, dblaikie

Subscribers: nemanjai

Differential Revision: https://reviews.llvm.org/D38172

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314781 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
test/CodeGen/PowerPC/debuginfo-split-int.ll [new file with mode: 0644]