[PATCH] D48283: [SCEV] Properly solve quadratic equations

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 11:51:44 PDT 2018


kparzysz updated this revision to Diff 158353.
kparzysz added a comment.
Herald added a subscriber: dexonsmith.

Moved the `SolveQuadraticEquation` to APIntOps and renamed it to `SolveQuadraticEquationWrap`.

Changed the comments to no longer refer to any multiplication by 2, now all actions related to that are only in ScalarEvolution.cpp.

Tested all widths between 2 and 10 (inclusive) using a brute-force test from https://reviews.llvm.org/D50095.


Repository:
  rL LLVM

https://reviews.llvm.org/D48283

Files:
  include/llvm/ADT/APInt.h
  lib/Analysis/ScalarEvolution.cpp
  lib/Support/APInt.cpp
  test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
  test/Analysis/ScalarEvolution/solve-quadratic-overflow.ll
  test/Analysis/ScalarEvolution/solve-quadratic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48283.158353.patch
Type: text/x-patch
Size: 52841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180731/1e96a3ea/attachment.bin>


More information about the llvm-commits mailing list