[PATCH] D55232: [SCEV] Suppress hoisting insertion point of binops when unsafe
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 4 19:57:54 PST 2018
mkazantsev added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolutionExpander.cpp:852
+ // Division by non-zero constants are safe to hoist.
+ IsSafeToHoist = !SC->getValue()->isZero();
}
----------------
Limiting to constants looks super-conservative. How about getting SCEV for RHS and then asking SE `isKnownPredicate(ICMP_NE, RHS, 0)`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55232/new/
https://reviews.llvm.org/D55232
More information about the llvm-commits
mailing list