[PATCH] D144845: [IRCE][Test] Add test to constrain a loop bounded by phi

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 00:58:31 PST 2023


mkazantsev added inline comments.


================
Comment at: llvm/test/Transforms/IRCE/constrain_loop_with_phi_bound.ll:1
+; RUN: opt -passes=irce -S -debug-only=irce < %s 2>&1 | FileCheck %s
+
----------------
; REQUIRES: asserts


================
Comment at: llvm/test/Transforms/IRCE/constrain_loop_with_phi_bound.ll:6
+; TODO: Prove that loop L1 is guarded by cond '0 <s x' to constrain the loop by IRCE
+; '%x01 >=s 0', '%x02 >=s 0', '%x != 0', hence 'x >s 0'
+define void @test_constrain_loop_with_phi_bound(i32 %n) {
----------------
I don't quite understand the example here. Call can return different values every time. IRCE is supposed to generate a loop-invariant check. How it would look like?


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

https://reviews.llvm.org/D144845



More information about the llvm-commits mailing list