[PATCH] D128779: [GuardWidening] Add tests showing the incorrect behavior of GW wrt poison
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 22:35:54 PDT 2022
mkazantsev added inline comments.
================
Comment at: llvm/test/Transforms/GuardWidening/posion.ll:14
+; The first two checks are in the first basic block and guard widening
+; consider them as profitable to combine.
+; When c4 and c3 are considered, number of check becomes more than two
----------------
nit: considers
================
Comment at: llvm/test/Transforms/GuardWidening/posion.ll:16
+; When c4 and c3 are considered, number of check becomes more than two
+; and combineRangeCheck consider then as profitable even if they are in
+; different basic blocks.
----------------
nit: consider then -> considers them
================
Comment at: llvm/test/Transforms/GuardWidening/posion.ll:22
+
+define void @combine_range_checks(i32 %x) {
+; CHECK-LABEL: @combine_range_checks(
----------------
please add FIXME into the comment
================
Comment at: llvm/test/Transforms/GuardWidening/posion.ll:73
+; CHECK-NEXT: [[WIDE_CHK:%.*]] = and i1 [[COND_0]], [[COND_2]]
+; CHECK-NEXT: call void (i1, ...) @llvm.experimental.guard(i1 [[WIDE_CHK]]) [ "deopt"() ]
+; CHECK-NEXT: br label [[LOOP:%.*]]
----------------
I don't quite get it. `COND_0` here is not poison, why would logical and not help?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128779/new/
https://reviews.llvm.org/D128779
More information about the llvm-commits
mailing list