Fix buildbot failure on 64 bit linux due to std::max() having different
operand types. llvm-svn: 181128
This commit is contained in:
parent
0a7abb655b
commit
2f75a0c0d8
|
@ -248,7 +248,7 @@ LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const
|
||||||
const GlobalValue *GV = GN->getGlobal();
|
const GlobalValue *GV = GN->getGlobal();
|
||||||
int64_t Offset = GN->getOffset();
|
int64_t Offset = GN->getOffset();
|
||||||
// We can only fold positive offsets that are a multiple of the word size.
|
// We can only fold positive offsets that are a multiple of the word size.
|
||||||
int64_t FoldedOffset = std::max(Offset & ~3, 0LL);
|
int64_t FoldedOffset = std::max(Offset & ~3, (int64_t)0);
|
||||||
SDValue GA = DAG.getTargetGlobalAddress(GV, DL, MVT::i32, FoldedOffset);
|
SDValue GA = DAG.getTargetGlobalAddress(GV, DL, MVT::i32, FoldedOffset);
|
||||||
GA = getGlobalAddressWrapper(GA, GV, DAG);
|
GA = getGlobalAddressWrapper(GA, GV, DAG);
|
||||||
// Handle the rest of the offset.
|
// Handle the rest of the offset.
|
||||||
|
|
Loading…
Reference in New Issue