[PATCH] D114018: [SCEV] Canonicalize X - urem X, Y patterns
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 16 11:34:22 PST 2021
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:2604
+ // Canonicalize (-1 * urem X, Y) + X --> (Y * X/Y)
+ if (Ops.size() == 2) {
----------------
What about the more general case of `(-1 * urem X, Y) + X + Z --> ((-1 * urem X, Y) + X) + Z --> (Y * X/Y) + Z` ?
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