So with 'i' it should actually work as a PC-relative mode. Gotcha, that totally makes sense. Thanks for confirming this @rnk.
Dec 27 2018
Dec 26 2018
@rnk thanks for looking into this!! yes, I need someone to commit it on my behalf.
Dec 25 2018
Thanks for looking into this @rnk. I am adding a unit test for this patch. Let me know if the test looks okay.
Nov 30 2018
@rnk Thanks for looking into this.
Nov 2 2018
Thanks for having look at this. I had also looked at that part, but the problem here has to do with local linkage functions which do not use GOTOFF relocations so classifyLocalReference() just returns MO_NO_FLAG. That's the reason why the if (isGlobalStubReference(Subtarget.classifyGlobalReference(GV))) does not catch this. However, these local linkage functions still need to be accessed in a RIP-relative way in the PIC mode and thus should not be used as immediate values.