[PATCH] D142542: [InstSimplify] Simplify icmp between Shl instructions of the same value

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 00:55:14 PST 2023


sdesmalen added inline comments.


================
Comment at: llvm/test/Transforms/InstSimplify/compare.ll:2918
+
+define i1 @neg_icmp_lshr_known_non_zero_sgt_nuw_nsw_smallest_shift(i8 %x) {
+; CHECK-LABEL: @neg_icmp_lshr_known_non_zero_sgt_nuw_nsw_smallest_shift(
----------------
nit: this name is a bit confusing, I'm not sure what you mean with 'nuw_nsw_smallest_shift' ?


================
Comment at: llvm/test/Transforms/InstSimplify/compare.ll:2933
+
+define i1 @neg_icmp_lshr_different_shift_values() {
+; CHECK-LABEL: @neg_icmp_lshr_different_shift_values(
----------------
Can you just use `%x` and `%y` instead of `@llvm.vscale` here?

It would be good also to have at least one positive test with `@llvm.vscale()`, could you please add one?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142542



More information about the llvm-commits mailing list