[PATCH] D104075: [ScalarEvolution] Merge howManyGreaterThans with howManyLessThans.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 11 03:30:40 PDT 2021


nikic added a comment.

There's a minor compile-time impact for this refactoring: https://llvm-compile-time-tracker.com/compare.php?from=57006d2f6d96d8a6836ae901218ed615071b3b8e&to=eca6ad2e31d754420fb114872bfc4060a698155e&stat=instructions It's okay, but you might want to cut down on the number of repeated/redundant getNotSCEV operations you perform. (They're not cached and known to be somewhat expensive.)



================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11566
+                  ? getNotSCEV(getSMinExpr(getNotSCEV(RHS), getNotSCEV(Start)))
+                  : getNotSCEV(getUMinExpr(getNotSCEV(RHS), getNotSCEV(Start)));
+      }
----------------
I'm confused by what you're doing here. `getNotSCEV` has a fold that does `~umin(~x, ~y)` to `umax(x, y)`, so the structure you're using here should get undone?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104075



More information about the llvm-commits mailing list