]> granicus.if.org Git - llvm/commit
[Debug info] Handle endianness when moving debug info for split integer values
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Mon, 2 Oct 2017 12:46:32 +0000 (12:46 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Mon, 2 Oct 2017 12:46:32 +0000 (12:46 +0000)
commit15907ace485e7dab56f96e178e65bc6d3f155254
tree77e951cfa754e152bfb14cb771871aaafc644ee2
parent6ed9ec6f65f69463d001fc382a1df37abeaa0056
[Debug info] Handle endianness when moving debug info for split integer values

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.

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@314666 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
test/CodeGen/PowerPC/debuginfo-split-int.ll [new file with mode: 0644]