diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-09 22:05:52 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-09 22:05:52 +0000 |
commit | 9ea3f56d07875ecb4ae2cd5bc14a9563b9742553 (patch) | |
tree | 12d5726126d68e19312e1c9a1983c860f4de536c /lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 7dc1def1623748b6c2f1812f1bf2e0153759c8b9 (diff) |
Teach isGAPlusOffset to respect a GlobalAddressSDNode's offset
value, which is something that apparently isn't used much.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index fe752de644..c99319338e 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -1487,7 +1487,9 @@ TargetLowering::SimplifySetCC(MVT VT, SDOperand N0, SDOperand N1, bool TargetLowering::isGAPlusOffset(SDNode *N, GlobalValue* &GA, int64_t &Offset) const { if (isa<GlobalAddressSDNode>(N)) { - GA = cast<GlobalAddressSDNode>(N)->getGlobal(); + GlobalAddressSDNode *GASD = cast<GlobalAddressSDNode>(N); + GA = GASD->getGlobal(); + Offset += GASD->getOffset(); return true; } |