[PATCH] D154953: [InstSimplify] Remove the remainder loop if we know the mask is always true

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 06:21:12 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/test/Transforms/InstCombine/rem-mul-shl.ll:901
+; TODO: have no bits that may be part of the mask set,
+; but now expect the const is a power of two
+define i64 @and_add_shl_vscale_not_power2() vscale_range(1,16) {
----------------
This one does have low bits set (it would be a negative test that cannot be folded).

An example that can be folded is constant 3072 (3 * 1024).


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

https://reviews.llvm.org/D154953



More information about the llvm-commits mailing list