[PATCH] D105771: [InstCombine] Precommit tests for D105088
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 11 11:58:15 PDT 2021
nikic added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/ptr-int-ptr-icmp.ll:39
+; CHECK-NEXT: [[P:%.*]] = inttoptr i64 [[I]] to i8*
+; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8* [[P]], [[Y:%.*]]
+; CHECK-NEXT: ret i1 [[CMP]]
----------------
As you can see, this test ends up being the same as the previous due to complexity canonicalization. You should replace `%Y` with an instruction rater than an argument to actually test the commuted variant. (grep "thwart complexity" and getComplexity for context).
================
Comment at: llvm/test/Transforms/InstCombine/ptr-int-ptr-icmp.ll:50
+
+define i1 @func4(i16* %X, i8* %Y) {
+; CHECK-LABEL: @func4(
----------------
It would be nice to pick more meaningful names for the tests, e.g. this could be `integer_type_too_small`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105771/new/
https://reviews.llvm.org/D105771
More information about the llvm-commits
mailing list