[PATCH] D123347: [ISD::IndexType] Helper functions for common queries.

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 03:47:02 PDT 2022


david-arm accepted this revision.
david-arm added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:10457
     SDValue Op = Index.getOperand(0);
-    MGS->setIndexType(Scaled ? ISD::UNSIGNED_SCALED : ISD::UNSIGNED_UNSCALED);
     if (TLI.shouldRemoveExtendFromGSIndex(Op.getValueType())) {
----------------
paulwalker-arm wrote:
> david-arm wrote:
> > Removing this looks like an actual function change, not just refactoring. It looks sensible, but it's not obvious from the commit message that you're also changing the behaviour. After your patch we won't change the index type unless we manage to refine the index.
> The new else block should maintain the original behaviour?  The only difference it that is doesn't overwrite `MSG`'s IndexType with the same value it already has.
Oh I see what you mean.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123347/new/

https://reviews.llvm.org/D123347



More information about the llvm-commits mailing list