If hasSymbolicDisplacement is false, there may still be a symbolic
displacement due to the order operands are matched.
X86DAGToDAGISel::matchAdd
...
// Try again after commuting the operands.
if (!matchAddressRecursively(Handle.getValue().getOperand(1), AM, Depth+1) && /// sets displacement
!matchAddressRecursively(Handle.getValue().getOperand(0), AM, Depth+1)) /// sets symbol
return false;This can create a leaq symbol+disp(%rip), %rax instruction relocated by
R_X86_64_PC32. If symbol+disp-rip>=2**31 there will be a relocation overflow.
This name doesn't match what's used in the definition of the function.