Test Failure: Transforms/LoopStrengthReduce/lsr-term-fold.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. FunctionToLoopPassAdaptor

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i64 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. PassManager<Function> : Skipping NOP
-- 4. LoopSimplifyPass

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i64 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 5. LoopSimplifyPass

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i64 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 6. LCSSAPass

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i64 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 7. LCSSAPass

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i64 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 8. PassManager<Function> : Skipping NOP
-- 9. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 10. LoopStrengthReducePass

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i64 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 11. LoopStrengthReducePass

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i64 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 12. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 13. FunctionToLoopPassAdaptor

----------------------------------------
define void @const_tripcount(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 14. PassManager<Function> : Skipping NOP
-- 15. PassManager<Function> : Skipping NOP
-- 16. FunctionToLoopPassAdaptor

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 17. PassManager<Function> : Skipping NOP
-- 18. LoopSimplifyPass

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 19. LoopSimplifyPass

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 20. LCSSAPass

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 21. LCSSAPass

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 22. PassManager<Function> : Skipping NOP
-- 23. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 24. LoopStrengthReducePass

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 25. LoopStrengthReducePass

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %#0 = add nsw i32 %N, 4294967295
  %#1 = zext i32 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 2
  %#3 = add nsw nuw i64 %#2, 88
  %scevgep = gep ptr %a, 1 x i64 %#3
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct!

-- 26. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 27. FunctionToLoopPassAdaptor

----------------------------------------
define void @runtime_tripcount(ptr %a, i32 %N) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %#0 = add nsw i32 %N, 4294967295
  %#1 = zext i32 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 2
  %#3 = add nsw nuw i64 %#2, 88
  %scevgep = gep ptr %a, 1 x i64 %#3
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 28. PassManager<Function> : Skipping NOP
-- 29. PassManager<Function> : Skipping NOP
-- 30. FunctionToLoopPassAdaptor

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i8 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add i8 %lsr.iv, 255
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i8 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 31. PassManager<Function> : Skipping NOP
-- 32. LoopSimplifyPass

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i8 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add i8 %lsr.iv, 255
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i8 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 33. LoopSimplifyPass

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i8 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add i8 %lsr.iv, 255
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i8 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 34. LCSSAPass

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i8 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add i8 %lsr.iv, 255
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i8 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 35. LCSSAPass

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i8 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add i8 %lsr.iv, 255
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i8 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 36. PassManager<Function> : Skipping NOP
-- 37. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 38. LoopStrengthReducePass

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i8 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add i8 %lsr.iv, 255
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i8 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 39. LoopStrengthReducePass

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i8 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add i8 %lsr.iv, 255
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i8 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @wrap_around(ptr %a, i8 %N) {
entry:
  %#0 = add i8 %N, 255
  %#1 = zext i8 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 2
  %#3 = add nsw nuw i64 %#2, 4
  %scevgep = gep ptr %a, 1 x i64 %#3
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct!

-- 40. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 41. FunctionToLoopPassAdaptor

----------------------------------------
define void @wrap_around(ptr %a, i8 %N) {
entry:
  %#0 = add i8 %N, 255
  %#1 = zext i8 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 2
  %#3 = add nsw nuw i64 %#2, 4
  %scevgep = gep ptr %a, 1 x i64 %#3
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 42. PassManager<Function> : Skipping NOP
-- 43. PassManager<Function> : Skipping NOP
-- 44. FunctionToLoopPassAdaptor

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds ptr %ptrptr
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ %length, %entry ]
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#0 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %it.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 45. PassManager<Function> : Skipping NOP
-- 46. LoopSimplifyPass

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds ptr %ptrptr
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ %length, %entry ]
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#0 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %it.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 47. LoopSimplifyPass

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds ptr %ptrptr
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ %length, %entry ]
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#0 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %it.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 48. LCSSAPass

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds ptr %ptrptr
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ %length, %entry ]
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#0 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %it.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 49. LCSSAPass

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds ptr %ptrptr
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ %length, %entry ]
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#0 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %it.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 50. PassManager<Function> : Skipping NOP
-- 51. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 52. LoopStrengthReducePass

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds ptr %ptrptr
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ %length, %entry ]
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#0 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %it.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 53. LoopStrengthReducePass

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds ptr %ptrptr
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ %length, %entry ]
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#0 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %it.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep ptr %ptrptr
  %#0 = add i32 %length, 4294967295
  %#1 = zext i32 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 3
  %#3 = add nsw nuw i64 %#2, 8
  %scevgep = gep ptr %start.ptrptr, 1 x i64 %#3
  br label %for.body

for.body:
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#4 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#4)
  %incdec.ptr = gep ptr %it.04, 8 x i64 1
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %incdec.ptr, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct!

-- 54. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 55. FunctionToLoopPassAdaptor

----------------------------------------
declare void @foo(ptr)

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep ptr %ptrptr
  %#0 = add i32 %length, 4294967295
  %#1 = zext i32 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 3
  %#3 = add nsw nuw i64 %#2, 8
  %scevgep = gep ptr %start.ptrptr, 1 x i64 %#3
  br label %for.body

for.body:
  %it.04 = phi ptr [ %incdec.ptr, %for.body ], [ %start.ptrptr, %entry ]
  %#4 = load ptr, ptr %it.04, align 8
  call void @foo(ptr %#4)
  %incdec.ptr = gep ptr %it.04, 8 x i64 1
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %incdec.ptr, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 56. PassManager<Function> : Skipping NOP
-- 57. PassManager<Function> : Skipping NOP
-- 58. FunctionToLoopPassAdaptor

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %entry ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %entry ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup, label %for.body

for.cond.cleanup:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 59. PassManager<Function> : Skipping NOP
-- 60. LoopSimplifyPass

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %entry ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %entry ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup, label %for.body

for.cond.cleanup:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 61. LoopSimplifyPass

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %entry ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %entry ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup, label %for.body

for.cond.cleanup:
  ret void
}
=>
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %for.body.preheader ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %for.body.preheader ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup.loopexit, label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void
}
Transformation seems to be correct!

-- 62. LCSSAPass

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %for.body.preheader ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %for.body.preheader ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup.loopexit, label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 63. LCSSAPass

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %for.body.preheader ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %for.body.preheader ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup.loopexit, label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 64. PassManager<Function> : Skipping NOP
-- 65. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 66. LoopStrengthReducePass

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %for.body.preheader ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %for.body.preheader ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup.loopexit, label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 67. LoopStrengthReducePass

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  br label %for.body

for.body:
  %i.05 = phi i32 [ %dec, %for.body ], [ signext %length, %for.body.preheader ]
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %for.body.preheader ]
  %#0 = load ptr, ptr %dst.04, align 8
  %#1 = call ptr foo(ptr %#0)
  %incdec.ptr = gep inbounds ptr %dst.04, 8 x i64 1
  %dec = add nsw i32 %i.05, 4294967295
  %tobool.not = icmp eq i32 %dec, 0
  br i1 %tobool.not, label %for.cond.cleanup.loopexit, label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void
}
=>
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  %#0 = add i32 signext %length, 4294967295
  %#1 = zext i32 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 3
  %#3 = add nsw nuw i64 %#2, 8
  %scevgep = gep ptr %mark, 1 x i64 %#3
  br label %for.body

for.body:
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %for.body.preheader ]
  %#4 = load ptr, ptr %dst.04, align 8
  %#5 = call ptr foo(ptr %#4)
  %incdec.ptr = gep ptr %dst.04, 8 x i64 1
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %incdec.ptr, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.cond.cleanup.loopexit, label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void
}
Transformation seems to be correct!

-- 68. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 69. FunctionToLoopPassAdaptor

----------------------------------------
declare void @foo(ptr)

foo = constant ? bytes, align 8

define void @iv_start_non_preheader(ptr %mark, i32 signext %length) {
entry:
  %tobool.not3 = icmp eq i32 signext %length, 0
  br i1 %tobool.not3, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  %#0 = add i32 signext %length, 4294967295
  %#1 = zext i32 %#0 to i64
  %#2 = shl nsw nuw i64 %#1, 3
  %#3 = add nsw nuw i64 %#2, 8
  %scevgep = gep ptr %mark, 1 x i64 %#3
  br label %for.body

for.body:
  %dst.04 = phi ptr [ %incdec.ptr, %for.body ], [ %mark, %for.body.preheader ]
  %#4 = load ptr, ptr %dst.04, align 8
  %#5 = call ptr foo(ptr %#4)
  %incdec.ptr = gep ptr %dst.04, 8 x i64 1
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %incdec.ptr, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.cond.cleanup.loopexit, label %for.body

for.cond.cleanup.loopexit:
  br label %for.cond.cleanup

for.cond.cleanup:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 70. PassManager<Function> : Skipping NOP
-- 71. PassManager<Function> : Skipping NOP
-- 72. FunctionToLoopPassAdaptor

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 4, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep inbounds ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 73. PassManager<Function> : Skipping NOP
-- 74. LoopSimplifyPass

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 4, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep inbounds ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 75. LoopSimplifyPass

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 4, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep inbounds ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 76. LCSSAPass

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 4, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep inbounds ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 77. LCSSAPass

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 4, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep inbounds ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 78. PassManager<Function> : Skipping NOP
-- 79. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 80. LoopStrengthReducePass

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 4, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep inbounds ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 81. LoopStrengthReducePass

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 4, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep inbounds ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @inbounds_poison_use(ptr %a) {
entry:
  %scevgep = gep ptr %a, 1 x i64 16
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 82. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 83. FunctionToLoopPassAdaptor

----------------------------------------
define void @inbounds_poison_use(ptr %a) {
entry:
  %scevgep = gep ptr %a, 1 x i64 16
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  store i8 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 84. PassManager<Function> : Skipping NOP
-- 85. PassManager<Function> : Skipping NOP
-- 86. FunctionToLoopPassAdaptor

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 87. PassManager<Function> : Skipping NOP
-- 88. LoopSimplifyPass

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 89. LoopSimplifyPass

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 90. LCSSAPass

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 91. LCSSAPass

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 92. PassManager<Function> : Skipping NOP
-- 93. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 94. LoopStrengthReducePass

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 95. LoopStrengthReducePass

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 96. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 97. FunctionToLoopPassAdaptor

----------------------------------------
define void @iv_size(ptr %a, i128 %N) {
entry:
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %a, %entry ]
  %lsr.iv = phi i128 [ %lsr.iv.next, %for.body ], [ %N, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i128 %lsr.iv, 340282366920938463463374607431768211455
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %exitcond.not = icmp eq i128 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 98. PassManager<Function> : Skipping NOP
-- 99. PassManager<Function> : Skipping NOP
-- 100. FunctionToLoopPassAdaptor

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 101. PassManager<Function> : Skipping NOP
-- 102. LoopSimplifyPass

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 103. LoopSimplifyPass

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 104. LCSSAPass

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 105. LCSSAPass

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 106. PassManager<Function> : Skipping NOP
-- 107. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 108. LoopStrengthReducePass

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 109. LoopStrengthReducePass

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 110. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 111. FunctionToLoopPassAdaptor

----------------------------------------
define void @IcmpSle(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 112. PassManager<Function> : Skipping NOP
-- 113. PassManager<Function> : Skipping NOP
-- 114. FunctionToLoopPassAdaptor

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp slt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 115. PassManager<Function> : Skipping NOP
-- 116. LoopSimplifyPass

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp slt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 117. LoopSimplifyPass

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp slt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 118. LCSSAPass

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp slt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 119. LCSSAPass

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp slt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 120. PassManager<Function> : Skipping NOP
-- 121. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 122. LoopStrengthReducePass

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp slt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 123. LoopStrengthReducePass

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp slt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1604
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 124. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 125. FunctionToLoopPassAdaptor

----------------------------------------
define void @IcmpSlt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1604
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 126. PassManager<Function> : Skipping NOP
-- 127. PassManager<Function> : Skipping NOP
-- 128. FunctionToLoopPassAdaptor

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 129. PassManager<Function> : Skipping NOP
-- 130. LoopSimplifyPass

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 131. LoopSimplifyPass

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 132. LCSSAPass

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 133. LCSSAPass

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 134. PassManager<Function> : Skipping NOP
-- 135. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 136. LoopStrengthReducePass

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 137. LoopStrengthReducePass

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
=>
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 138. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 139. FunctionToLoopPassAdaptor

----------------------------------------
define void @IcmpSgt(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 140. PassManager<Function> : Skipping NOP
-- 141. PassManager<Function> : Skipping NOP
-- 142. FunctionToLoopPassAdaptor

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 143. PassManager<Function> : Skipping NOP
-- 144. LoopSimplifyPass

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 145. LoopSimplifyPass

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 146. LCSSAPass

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 147. LCSSAPass

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 148. PassManager<Function> : Skipping NOP
-- 149. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 150. LoopStrengthReducePass

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 151. LoopStrengthReducePass

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sgt i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.body, label %for.end

for.end:
  ret void
}
=>
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 152. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 153. FunctionToLoopPassAdaptor

----------------------------------------
define void @SeveralLoopLatch(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 154. PassManager<Function> : Skipping NOP
-- 155. PassManager<Function> : Skipping NOP
-- 156. FunctionToLoopPassAdaptor

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 157. PassManager<Function> : Skipping NOP
-- 158. LoopSimplifyPass

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 159. LoopSimplifyPass

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 160. LCSSAPass

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 161. LCSSAPass

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 162. PassManager<Function> : Skipping NOP
-- 163. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 164. LoopStrengthReducePass

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 165. LoopStrengthReducePass

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %another.branch ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 4294967295
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %exitcond.not = icmp sle i32 %lsr.iv.next, 0
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 166. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 167. FunctionToLoopPassAdaptor

----------------------------------------
define void @SeveralLoopLatch2(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i32 84
  %scevgep = gep ptr %a, 1 x i64 1600
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %another.branch ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 4
  br label %another.branch

another.branch:
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 168. PassManager<Function> : Skipping NOP
-- 169. PassManager<Function> : Skipping NOP
-- 170. FunctionToLoopPassAdaptor

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  switch i64 %lsr.iv.next, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 171. PassManager<Function> : Skipping NOP
-- 172. LoopSimplifyPass

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  switch i64 %lsr.iv.next, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 173. LoopSimplifyPass

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  switch i64 %lsr.iv.next, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 174. LCSSAPass

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  switch i64 %lsr.iv.next, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 175. LCSSAPass

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  switch i64 %lsr.iv.next, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 176. PassManager<Function> : Skipping NOP
-- 177. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 178. LoopStrengthReducePass

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  switch i64 %lsr.iv.next, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 179. LoopStrengthReducePass

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 379, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i64 %lsr.iv, -1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  switch i64 %lsr.iv.next, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
=>
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv2 = phi i64 [ %lsr.iv.next3, %for.body ], [ 378, %entry ]
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr.iv.next3 = add nsw i64 %lsr.iv2, -1
  switch i64 %lsr.iv2, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}

****************************************
WARNING: Source function is always UB.
It can be refined by any target function.
Please make sure this is what you wanted.
****************************************

Transformation doesn't verify! (not unsound)
ERROR: The source program doesn't reach a return instruction.
Consider increasing the unroll factor if it has loops
-- 180. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 181. FunctionToLoopPassAdaptor

----------------------------------------
define void @non_branch_terminator(ptr %a) {
entry:
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv2 = phi i64 [ %lsr.iv.next3, %for.body ], [ 378, %entry ]
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i64 4
  %lsr.iv.next3 = add nsw i64 %lsr.iv2, -1
  switch i64 %lsr.iv2, label %for.body [
    i64 0, label %for.end
  ]

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 182. PassManager<Function> : Skipping NOP
-- 183. PassManager<Function> : Skipping NOP
-- 184. FunctionToLoopPassAdaptor

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 185. PassManager<Function> : Skipping NOP
-- 186. LoopSimplifyPass

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 187. LoopSimplifyPass

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 188. LCSSAPass

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 189. LCSSAPass

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 190. PassManager<Function> : Skipping NOP
-- 191. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 192. LoopStrengthReducePass

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 193. LoopStrengthReducePass

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 194. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 195. FunctionToLoopPassAdaptor

----------------------------------------
define void @profiled_short_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 196. PassManager<Function> : Skipping NOP
-- 197. PassManager<Function> : Skipping NOP
-- 198. FunctionToLoopPassAdaptor

----------------------------------------
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 199. PassManager<Function> : Skipping NOP
-- 200. LoopSimplifyPass

----------------------------------------
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 201. LoopSimplifyPass

----------------------------------------
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 202. LCSSAPass

----------------------------------------
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 203. LCSSAPass

----------------------------------------
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 204. PassManager<Function> : Skipping NOP
-- 205. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 206. LoopStrengthReducePass

----------------------------------------
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 207. LoopStrengthReducePass

----------------------------------------
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body ], [ 0, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %lsr.iv.next = add nsw i32 %lsr.iv, 1
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %exitcond.not = icmp eq i32 %lsr.iv.next, %n
  br i1 %exitcond.not, label %for.end, label %for.body

for.end:
  ret void
}
=>
define void @profiled_long_tc(ptr %a, i32 %offset, i32 %n) {
entry:
  %offset.nonzero = or i32 %offset, 1
  %uglygep = gep ptr %a, 1 x i64 84
  %#0 = add i32 %n, 4294967295
  %#1 = zext i32 %#0 to i64
  %#2 = add nsw nuw i64 %#1, 1
  %#3 = sext i32 %offset.nonzero to i64
  %#4 = mul i64 %#2, %#3
  %#5 = add nsw i64 %#4, 84
  %scevgep = gep ptr %a, 1 x i64 %#5
  br label %for.body

for.body:
  %lsr.iv1 = phi ptr [ %uglygep2, %for.body ], [ %uglygep, %entry ]
  store i32 1, ptr %lsr.iv1, align 4
  %uglygep2 = gep ptr %lsr.iv1, 1 x i32 %offset.nonzero
  %lsr_fold_term_cond.replaced_term_cond = icmp eq ptr %uglygep2, %scevgep, use_provenance
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

for.end:
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
ptr %a = pointer(non-local, block_id=1, offset=0)
i32 %offset = poison
i32 %n = #x00000001 (1)

Source:
i32 %offset.nonzero = poison
ptr %uglygep = pointer(non-local, block_id=1, offset=84)
  >> Jump to %for.body
ptr %lsr.iv1 = pointer(non-local, block_id=1, offset=84)
i32 %lsr.iv = #x00000000 (0)
i32 %lsr.iv.next = #x00000001 (1)
ptr %uglygep2 = poison
i1 %exitcond.not = #x1 (1)
  >> Jump to %for.end

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 4	alloc type: 0	alive: false	address: 0
Block 1 >	size: 96	align: 1	alloc type: 0	alive: true	address: 4

Target:
i32 %offset.nonzero = poison
ptr %uglygep = pointer(non-local, block_id=1, offset=84)
i32 %#0 = #x00000000 (0)
i64 %#1 = #x0000000000000000 (0)
i64 %#2 = #x0000000000000001 (1)
i64 %#3 = poison
i64 %#4 = poison
i64 %#5 = poison
ptr %scevgep = poison
  >> Jump to %for.body
ptr %lsr.iv1 = pointer(non-local, block_id=1, offset=84)
ptr %uglygep2 = poison
i1 %lsr_fold_term_cond.replaced_term_cond = poison
UB triggered on br


Pass: LoopStrengthReducePass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=loop-reduce' '-S' '-lsr-term-fold' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_X0u3ddcZ_3MYs.bc"


------------------- SMT STATS -------------------
Num queries: 60
Num invalid: 0
Num skips:   0
Num trivial: 49 (45.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     43 (71.7%)
Num UNSAT:   17 (28.3%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopStrengthReduce/lsr-term-fold.ll -passes="loop-reduce" -S -lsr-term-fold | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopStrengthReduce/lsr-term-fold.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=loop-reduce -S -lsr-term-fold
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopStrengthReduce/lsr-term-fold.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LoopStrengthReduce/lsr-term-fold.ll

 

<-- Back