mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
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
This commit is contained in:
parent
7dc1def162
commit
9ea3f56d07
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user