mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Teach isGAPlusOffset to respect a GlobalAddressSDNode's offset
value, which is something that apparently isn't used much. llvm-svn: 52158
This commit is contained in:
parent
68f8fbdac4
commit
c87fbbd014
@ -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…
Reference in New Issue
Block a user