[PATCH] D31833: [x86] Relax the check in areLoadsFromSameBasePtr

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 15:22:55 PDT 2017


craig.topper added a comment.

Evan Cheng added this in r94147 at that time there was an additional check on the index register itself too. This is what the "Index should be Reg0" comment was referring too, but I don't know what that means. Its before my time.  Jakob Stoklund Olesen removed that check in r100497, but did not update the comment about Reg0.

I think this change is fine.

While you're touching this can you use the X86::AddrBaseReg, X86::AddrScaleAmt, etc. constants when calling getOperand. This will improve readability here.


https://reviews.llvm.org/D31833





More information about the llvm-commits mailing list