projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dc1def
)
Teach isGAPlusOffset to respect a GlobalAddressSDNode's offset
author
Dan Gohman
<gohman@apple.com>
Mon, 9 Jun 2008 22:05:52 +0000
(22:05 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 9 Jun 2008 22:05:52 +0000
(22:05 +0000)
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
lib/CodeGen/SelectionDAG/TargetLowering.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index fe752de64454c0901cebe03162d4cced14891f3f..c99319338e3aa9194d14215def9e7070abdc90b5 100644
(file)
--- 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;
}