[all-commits] [llvm/llvm-project] b980d2: [unittest] Exercise SCEV's udiv and udiv ceiling r...
Philip Reames via All-commits
all-commits at lists.llvm.org
Thu Jul 15 11:59:33 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b980d2f54bb652208eeb9a6543b8d838b65ad099
https://github.com/llvm/llvm-project/commit/b980d2f54bb652208eeb9a6543b8d838b65ad099
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-07-15 (Thu, 15 Jul 2021)
Changed paths:
M llvm/include/llvm/Analysis/ScalarEvolution.h
M llvm/unittests/Analysis/ScalarEvolutionTest.cpp
Log Message:
-----------
[unittest] Exercise SCEV's udiv and udiv ceiling routines
The ceiling variant was recently added (due to the work towards D105216), and we're spending a lot of time trying to find optimizations for the expression. This patch brute forces the space of i8 unsigned divides and checks that we get a correct (well consistent with APInt) result for both udiv and udiv ceiling.
(This is basically what I've been doing locally in a hand rolled C++ program, and I realized there no good reason not to check it in as a unit test which directly exercises the logic on constants.)
Differential Revision: https://reviews.llvm.org/D106083
More information about the All-commits
mailing list