[PATCH] D132960: [InstCombine] Transform small unaligned memcmp calls used in zero equality tests

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 14:11:24 PDT 2022


nikic added a comment.

Agree with @efriedma, I don't think we want to introduce unaligned loads without some TTI driven cost modelling.

I believe the original plan was to move the MergeICmps and ExpandMemCmp passes from the backend into the (late) optimization pipeline, which would allow follow-on optimizations to apply. I believe this change also landed at some point, but was reverted (due to some sanitizer interaction possibly?) and nobody bothered bringing it back.

At a high level, I think that would still be the proper way to do things. ExpandMemCmp is the pass that implements the fully general, TTI-driven logic for these expansions, and we probably should not subsume it for non-trivial cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132960



More information about the llvm-commits mailing list