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
  br label %for.body

for.body:
  %lsr.iv2 = phi i64 [ %lsr.iv.next3, %for.body ], [ -379, %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
  %exitcond.not = icmp eq i64 %lsr.iv.next3, 0
  br i1 %exitcond.not, 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. LoopTermFoldPass

----------------------------------------
define void @const_tripcount(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 ], [ -379, %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
  %exitcond.not = icmp eq i64 %lsr.iv.next3, 0
  br i1 %exitcond.not, label %for.end, label %for.body

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

-- 13. LoopTermFoldPass

----------------------------------------
define void @const_tripcount(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 ], [ -379, %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
  %exitcond.not = icmp eq i64 %lsr.iv.next3, 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, offsetonly
  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
-- 14. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 15. 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)

-- 16. PassManager<Function> : Skipping NOP
-- 17. PassManager<Function> : Skipping NOP
-- 18. 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)

-- 19. PassManager<Function> : Skipping NOP
-- 20. 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)

-- 21. 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)

-- 22. 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)

-- 23. 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)

-- 24. PassManager<Function> : Skipping NOP
-- 25. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 26. 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)

-- 27. 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)

-- 28. LoopTermFoldPass

----------------------------------------
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)

-- 29. LoopTermFoldPass

----------------------------------------
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, offsetonly
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

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

-- 30. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 31. 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)

-- 32. PassManager<Function> : Skipping NOP
-- 33. PassManager<Function> : Skipping NOP
-- 34. 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)

-- 35. PassManager<Function> : Skipping NOP
-- 36. 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)

-- 37. 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)

-- 38. 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)

-- 39. 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)

-- 40. PassManager<Function> : Skipping NOP
-- 41. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 42. 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)

-- 43. 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)

-- 44. LoopTermFoldPass

----------------------------------------
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)

-- 45. LoopTermFoldPass

----------------------------------------
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, offsetonly
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

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

-- 46. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 47. 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)

-- 48. PassManager<Function> : Skipping NOP
-- 49. PassManager<Function> : Skipping NOP
-- 50. 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
  tail 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)

-- 51. PassManager<Function> : Skipping NOP
-- 52. 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
  tail 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. 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
  tail 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)

-- 54. 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
  tail 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)

-- 55. 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
  tail 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)

-- 56. PassManager<Function> : Skipping NOP
-- 57. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 58. 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
  tail 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)

-- 59. 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
  tail 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)

-- 60. LoopTermFoldPass

----------------------------------------
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
  tail 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)

-- 61. LoopTermFoldPass

----------------------------------------
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
  tail 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 inbounds 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 %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
  tail 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, offsetonly
  br i1 %lsr_fold_term_cond.replaced_term_cond, label %for.end, label %for.body

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

-- 62. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 63. FunctionToLoopPassAdaptor

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

define void @ptr_of_ptr_addrec(ptr %ptrptr, i32 %length) {
entry:
  %start.ptrptr = gep inbounds 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 %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
  tail 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)

-- 64. PassManager<Function> : Skipping NOP
-- 65. PassManager<Function> : Skipping NOP
-- 66. FunctionToLoopPassAdaptor

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

@foo = constant ? bytes, exec, 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)

-- 67. PassManager<Function> : Skipping NOP
-- 68. LoopSimplifyPass

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

@foo = constant ? bytes, exec, 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)

-- 69. LoopSimplifyPass

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

@foo = constant ? bytes, exec, 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, exec, 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!

-- 70. LCSSAPass

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

@foo = constant ? bytes, exec, 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)

-- 71. LCSSAPass

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

@foo = constant ? bytes, exec, 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)

-- 72. PassManager<Function> : Skipping NOP
-- 73. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 74. LoopStrengthReducePass

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

@foo = constant ? bytes, exec, 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)

-- 75. LoopStrengthReducePass

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

@foo = constant ? bytes, exec, 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)

-- 76. LoopTermFoldPass

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

@foo = constant ? bytes, exec, 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)

-- 77. LoopTermFoldPass

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

@foo = constant ? bytes, exec, 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, exec, 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, offsetonly
  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!

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

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

@foo = constant ? bytes, exec, 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)

-- 80. PassManager<Function> : Skipping NOP
-- 81. PassManager<Function> : Skipping NOP
-- 82. 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)

-- 83. PassManager<Function> : Skipping NOP
-- 84. 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)

-- 85. 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)

-- 86. 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)

-- 87. 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)

-- 88. PassManager<Function> : Skipping NOP
-- 89. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 90. 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)

-- 91. 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)

-- 92. LoopTermFoldPass

----------------------------------------
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)

-- 93. LoopTermFoldPass

----------------------------------------
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, offsetonly
  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
-- 94. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 95. 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)

-- 96. PassManager<Function> : Skipping NOP
-- 97. PassManager<Function> : Skipping NOP
-- 98. 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)

-- 99. PassManager<Function> : Skipping NOP
-- 100. 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)

-- 101. 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)

-- 102. 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)

-- 103. 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)

-- 104. PassManager<Function> : Skipping NOP
-- 105. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 106. 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)

-- 107. 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)

-- 108. LoopTermFoldPass

----------------------------------------
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)

-- 109. LoopTermFoldPass

----------------------------------------
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)

-- 110. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 111. 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)

-- 112. PassManager<Function> : Skipping NOP
-- 113. PassManager<Function> : Skipping NOP
-- 114. 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)

-- 115. PassManager<Function> : Skipping NOP
-- 116. 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)

-- 117. 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)

-- 118. 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)

-- 119. 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)

-- 120. PassManager<Function> : Skipping NOP
-- 121. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 122. 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)

-- 123. 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)

-- 124. LoopTermFoldPass

----------------------------------------
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)

-- 125. LoopTermFoldPass

----------------------------------------
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, offsetonly
  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
-- 126. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 127. 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)

-- 128. PassManager<Function> : Skipping NOP
-- 129. PassManager<Function> : Skipping NOP
-- 130. 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)

-- 131. PassManager<Function> : Skipping NOP
-- 132. 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)

-- 133. 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)

-- 134. 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)

-- 135. 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)

-- 136. PassManager<Function> : Skipping NOP
-- 137. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 138. 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)

-- 139. 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)

-- 140. LoopTermFoldPass

----------------------------------------
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)

-- 141. LoopTermFoldPass

----------------------------------------
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, offsetonly
  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
-- 142. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 143. 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)

-- 144. PassManager<Function> : Skipping NOP
-- 145. PassManager<Function> : Skipping NOP
-- 146. 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)

-- 147. PassManager<Function> : Skipping NOP
-- 148. 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)

-- 149. 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)

-- 150. 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)

-- 151. 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)

-- 152. PassManager<Function> : Skipping NOP
-- 153. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 154. 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)

-- 155. 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)

-- 156. LoopTermFoldPass

----------------------------------------
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)

-- 157. LoopTermFoldPass

----------------------------------------
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, offsetonly
  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
-- 158. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 159. 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)

-- 160. PassManager<Function> : Skipping NOP
-- 161. PassManager<Function> : Skipping NOP
-- 162. 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)

-- 163. PassManager<Function> : Skipping NOP
-- 164. 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)

-- 165. 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)

-- 166. 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)

-- 167. 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)

-- 168. PassManager<Function> : Skipping NOP
-- 169. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 170. 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)

-- 171. 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)

-- 172. LoopTermFoldPass

----------------------------------------
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)

-- 173. LoopTermFoldPass

----------------------------------------
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, offsetonly
  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
-- 174. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 175. 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)

-- 176. PassManager<Function> : Skipping NOP
-- 177. PassManager<Function> : Skipping NOP
-- 178. 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)

-- 179. PassManager<Function> : Skipping NOP
-- 180. 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)

-- 181. 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)

-- 182. 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)

-- 183. 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)

-- 184. PassManager<Function> : Skipping NOP
-- 185. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 186. 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)

-- 187. 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)

-- 188. LoopTermFoldPass

----------------------------------------
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)

-- 189. LoopTermFoldPass

----------------------------------------
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, offsetonly
  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
-- 190. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 191. 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)

-- 192. PassManager<Function> : Skipping NOP
-- 193. PassManager<Function> : Skipping NOP
-- 194. 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)

-- 195. PassManager<Function> : Skipping NOP
-- 196. 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)

-- 197. 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)

-- 198. 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)

-- 199. 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)

-- 200. PassManager<Function> : Skipping NOP
-- 201. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 202. 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)

-- 203. 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
-- 204. LoopTermFoldPass

----------------------------------------
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)

-- 205. LoopTermFoldPass

----------------------------------------
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)

-- 206. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 207. 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)

-- 208. PassManager<Function> : Skipping NOP
-- 209. PassManager<Function> : Skipping NOP
-- 210. 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)

-- 211. PassManager<Function> : Skipping NOP
-- 212. 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)

-- 213. 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)

-- 214. 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)

-- 215. 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)

-- 216. PassManager<Function> : Skipping NOP
-- 217. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 218. 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)

-- 219. 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)

-- 220. LoopTermFoldPass

----------------------------------------
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)

-- 221. LoopTermFoldPass

----------------------------------------
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)

-- 222. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 223. 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)

-- 224. PassManager<Function> : Skipping NOP
-- 225. PassManager<Function> : Skipping NOP
-- 226. 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)

-- 227. PassManager<Function> : Skipping NOP
-- 228. 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)

-- 229. 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)

-- 230. 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)

-- 231. 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)

-- 232. PassManager<Function> : Skipping NOP
-- 233. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 234. 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)

-- 235. 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)

-- 236. LoopTermFoldPass

----------------------------------------
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)

-- 237. LoopTermFoldPass

----------------------------------------
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, offsetonly
  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) / Address=#x0000000000000004
i32 %offset = poison
i32 %n = #x00000001 (1)

Source:
i32 %offset.nonzero = poison
ptr %uglygep = pointer(non-local, block_id=1, offset=84) / Address=#x0000000000000058
  >> Jump to %for.body
ptr %lsr.iv1 = pointer(non-local, block_id=1, offset=84) / Address=#x0000000000000058
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: 128	align: 4	alloc type: 0	alive: true	address: 4

Target:
i32 %offset.nonzero = poison
ptr %uglygep = pointer(non-local, block_id=1, offset=84) / Address=#x0000000000000058
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) / Address=#x0000000000000058
ptr %uglygep2 = poison
i1 %lsr_fold_term_cond.replaced_term_cond = poison
UB triggered on br


Pass: LoopTermFoldPass
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,loop-term-fold' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_L9Ddf0Bj_H8hH.bc"


------------------- SMT STATS -------------------
Num queries: 64
Num invalid: 0
Num skips:   0
Num trivial: 52 (44.8%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     45 (70.3%)
Num UNSAT:   19 (29.7%)
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,loop-term-fold" -S | /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,loop-term-fold -S
+ /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