1
0
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:
Dan Gohman 2008-06-09 22:05:52 +00:00
parent 68f8fbdac4
commit c87fbbd014

View File

@ -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;
}