OSDN Git Service

[SelectionDAG] Fold more offsets into GlobalAddresses
authorDan Gohman <dan433584@gmail.com>
Fri, 22 Jan 2016 03:57:34 +0000 (03:57 +0000)
committerDan Gohman <dan433584@gmail.com>
Fri, 22 Jan 2016 03:57:34 +0000 (03:57 +0000)
commitf2cde91200e362b44c66e1ee42a2a4b1af49e450
tree856a102a2c519a29365b545e16d1ba49e61a6c0e
parent96905168357c2c295b1d102e0ce03b528ea9f261
[SelectionDAG] Fold more offsets into GlobalAddresses

This reapplies r258296 and r258366, and also fixes an existing bug in
SelectionDAG.cpp's isMemSrcFromString, neglecting to account for the
offset in a GlobalAddressSDNode, which is uncovered by those patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258482 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/CodeGen/WebAssembly/address-offsets.ll [new file with mode: 0644]
test/CodeGen/X86/lea-opt.ll
test/CodeGen/X86/memcpy-from-string.ll [new file with mode: 0644]
test/CodeGen/X86/negative-offset.ll [new file with mode: 0644]
test/CodeGen/XCore/threads.ll