[PATCH] D102864: [InstSimplify] Transform X * Y % Y --> 0.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 14:06:50 PDT 2021


spatel added a comment.

Do you have commit access? If so, please add the test file with baseline CHECK lines as a preliminary patch.



================
Comment at: llvm/test/Transforms/InstSimplify/rem.ll:335
+
+define i32 @srem_of_mul_nsw(i32 %x, i32 %y) {
+; CHECK-LABEL: @srem_of_mul_nsw(
----------------
We should have the commuted variant of this test too. Even better if you use a vector type for that case, so we have coverage for that possibility too.


================
Comment at: llvm/test/Transforms/InstSimplify/rem.ll:377
+
+define i32 @urem_of_mul_nuw(i32 %x, i32 %y) {
+; CHECK-LABEL: @urem_of_mul_nuw(
----------------
Similar to above - please add a commuted mul operand test for more coverage.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102864



More information about the llvm-commits mailing list