[PATCH] D139403: [SCEV] Compute symbolic exit count for 'and' conditions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 23:44:01 PST 2022


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:8984
+                                                      EL1.SymbolicMaxNotTaken,
+                                                      /*Sequential*/ true);
   } else {
----------------
This should pass `!isa<BinaryOperator>(ExitCond)` as in the ExactNotTaken case above.


================
Comment at: llvm/test/Analysis/ScalarEvolution/symbolic_max_exit_count.ll:560
   %c2 = and i1 %zero_check_2, %scam_2
   %merged_cond = select i1 %c1, i1 true, i1 %c2
   br i1 %merged_cond, label %range_check_block, label %failed_1
----------------
This should be `select i1 %c1, i1 %c2, i1 false`. You made this an or rather than an and.


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

https://reviews.llvm.org/D139403



More information about the llvm-commits mailing list