[PATCH] D136340: [tests] precommit tests for D136015

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 06:33:06 PDT 2022


spatel added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/mul.ll:1587-1588
+; CHECK-NEXT:    [[IN1HI:%.*]] = lshr i64 [[IN1]], 32
+; CHECK-NEXT:    [[M10:%.*]] = mul i64 [[IN1HI]], [[IN0]]
+; CHECK-NEXT:    [[M01:%.*]] = mul i64 [[IN0HI]], [[IN1]]
+; CHECK-NEXT:    [[M00:%.*]] = mul nuw i64 [[IN1LO]], [[IN0LO]]
----------------
In all of the tests with no extra uses, we are able to reduce the patterns to use the unmasked in0/in1 rather than In0Lo/In1Lo.

To get better test coverage, we need more variety of the patterns that actually use the Lo values, so add extra uses to more of these tests to exercise those cases.

You can vary the types (wider, narrower, vectors) in this set of 16 tests, so we don't need extra tests specifically for different types.


================
Comment at: llvm/test/Transforms/InstCombine/mul.ll:1695
+; CHECK-NEXT:    [[IN1HI:%.*]] = lshr i64 [[IN1]], 32
+; CHECK-NEXT:    [[M10:%.*]] = mul i64 [[IN1HI]], [[IN0]]
+; CHECK-NEXT:    [[M01:%.*]] = mul i64 [[IN0HI]], [[IN1]]
----------------
We can see that the commuted instruction is not actually tested because it changed. You'll need to add something (extra uses?) to make sure the tests are providing the coverage for the expected pattern.


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

https://reviews.llvm.org/D136340



More information about the llvm-commits mailing list