[PATCH] D114018: [SCEV] Canonicalize X - urem X, Y patterns

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 16 11:50:44 PST 2021


efriedma added reviewers: dmgreen, SjoerdMeijer.
efriedma added a comment.

> Why this appears to minorly negatively impact hardware loop recognition on ARM, I have no idea.

We're recognizing more loops, not less.  The "le" instruction indicates we've recognized a loop; we generate a generic branch "bne" when we don't.  It's more instructions outside the loop because hardware loop optimization requires materializing the precise trip count.  The sequence we're using to compute the trip count is messy, though. I guess the issue is that we're running SCEVExpander later than we otherwise would?

Adding a couple reviewers more familiar with MVE in case they have any further comment on this, but the ARM changes should be fine as-is.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114018



More information about the llvm-commits mailing list