[PATCH] D135957: [AArch64][SeperateConstOffsetFromGEP] Prevent pass from splitting GEP if an index has more than one use

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 04:26:25 PDT 2022


dmgreen added a comment.

Hmm. Should we be going further though? i.e why is it limited to the first index of a 2 element gep? Should ConstantOffsetExtractor::Extract be considering the number of uses of the Add/Sub/Or is examines, and checking whether we are going to require duplicating instructions to separate the constant.

Perhaps isLegalAddressingMode should be being queried more too, I'm not sure. It might require some careful benchmarking for me to be sure it isn't making some cases worse. Some cases might have multiple uses that can all be converted successfully together.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135957



More information about the llvm-commits mailing list