Test source: git
Comments: LLVM PR51906
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 ERROR: Unsupported attribute: noalias ERROR: Unsupported metadata: 1 ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 ERROR: Unsupported attribute: noalias ERROR: Unsupported attribute: writable ERROR: Unsupported attribute: noalias ERROR: Unsupported attribute: writable -- 1. PassManager<Function> : Skipping NOP -- 2. FunctionToLoopPassAdaptor ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void } Transformation seems to be correct! (syntactically equal) -- 3. PassManager<Function> : Skipping NOP -- 4. LoopSimplifyPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void } Transformation seems to be correct! (syntactically equal) -- 5. LoopSimplifyPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void } Transformation seems to be correct! (syntactically equal) -- 6. LCSSAPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void } Transformation seems to be correct! (syntactically equal) -- 7. LCSSAPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: 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. LICMPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void } Transformation seems to be correct! (syntactically equal) -- 11. LICMPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void } => @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: %X.promoted = load i32, ptr @X, align 4 br label %Loop Loop: %x21 = phi i32 [ %X.promoted, %Entry ], [ %x2, %Loop ] %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x2 = add i32 %x21, 1 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: %x2.lcssa = phi i32 [ %x2, %Loop ] store i32 %x2.lcssa, ptr @X, align 4 ret void } **************************************** WARNING: Source function is always UB. It can be refined by any target function. Please make sure this is what you wanted. **************************************** Transformation doesn't verify! (not unsound) ERROR: The source program doesn't reach a return instruction. Consider increasing the unroll factor if it has loops -- 12. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 13. FunctionToLoopPassAdaptor ---------------------------------------- @X = global 4 bytes, align 4 define void @test1(i32 %i) { Entry: %X.promoted = load i32, ptr @X, align 4 br label %Loop Loop: %x21 = phi i32 [ %X.promoted, %Entry ], [ %x2, %Loop ] %j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] %x2 = add i32 %x21, 1 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: %x2.lcssa = phi i32 [ %x2, %Loop ] store i32 %x2.lcssa, ptr @X, align 4 ret void } Transformation seems to be correct! (syntactically equal) -- 14. PassManager<Function> : Skipping NOP -- 15. PassManager<Function> : Skipping NOP -- 16. FunctionToLoopPassAdaptor ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: br label %Loop Loop: %X1 = gep ptr @X, 4 x i64 1 %A = load i32, ptr %X1, align 4 %V = add i32 %A, 1 %X2 = gep ptr @X, 4 x i64 1 store i32 %V, ptr %X2, align 4 br i1 0, label %Loop, label %Exit Exit: ret void } Transformation seems to be correct! (syntactically equal) -- 17. PassManager<Function> : Skipping NOP -- 18. LoopSimplifyPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: br label %Loop Loop: %X1 = gep ptr @X, 4 x i64 1 %A = load i32, ptr %X1, align 4 %V = add i32 %A, 1 %X2 = gep ptr @X, 4 x i64 1 store i32 %V, ptr %X2, align 4 br i1 0, label %Loop, label %Exit Exit: ret void } Transformation seems to be correct! (syntactically equal) -- 19. LoopSimplifyPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: br label %Loop Loop: %X1 = gep ptr @X, 4 x i64 1 %A = load i32, ptr %X1, align 4 %V = add i32 %A, 1 %X2 = gep ptr @X, 4 x i64 1 store i32 %V, ptr %X2, align 4 br i1 0, label %Loop, label %Exit Exit: ret void } Transformation seems to be correct! (syntactically equal) -- 20. LCSSAPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: br label %Loop Loop: %X1 = gep ptr @X, 4 x i64 1 %A = load i32, ptr %X1, align 4 %V = add i32 %A, 1 %X2 = gep ptr @X, 4 x i64 1 store i32 %V, ptr %X2, align 4 br i1 0, label %Loop, label %Exit Exit: ret void } Transformation seems to be correct! (syntactically equal) -- 21. LCSSAPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: br label %Loop Loop: %X1 = gep ptr @X, 4 x i64 1 %A = load i32, ptr %X1, align 4 %V = add i32 %A, 1 %X2 = gep ptr @X, 4 x i64 1 store i32 %V, ptr %X2, align 4 br i1 0, label %Loop, label %Exit Exit: ret void } Transformation seems to be correct! (syntactically equal) -- 22. PassManager<Function> : Skipping NOP -- 23. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 24. LICMPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: br label %Loop Loop: %X1 = gep ptr @X, 4 x i64 1 %A = load i32, ptr %X1, align 4 %V = add i32 %A, 1 %X2 = gep ptr @X, 4 x i64 1 store i32 %V, ptr %X2, align 4 br i1 0, label %Loop, label %Exit Exit: ret void } Transformation seems to be correct! (syntactically equal) -- 25. LICMPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: br label %Loop Loop: %X1 = gep ptr @X, 4 x i64 1 %A = load i32, ptr %X1, align 4 %V = add i32 %A, 1 %X2 = gep ptr @X, 4 x i64 1 store i32 %V, ptr %X2, align 4 br i1 0, label %Loop, label %Exit Exit: ret void } => @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: %X1 = gep ptr @X, 4 x i64 1 %X1.promoted = load i32, ptr %X1, align 4 br label %Loop Loop: %A1 = phi i32 [ %V, %Loop ], [ %X1.promoted, %Entry ] %V = add i32 %A1, 1 br i1 0, label %Loop, label %Exit Exit: %V.lcssa = phi i32 [ %V, %Loop ] store i32 %V.lcssa, ptr %X1, align 4 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 seems to be correct! -- 26. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 27. FunctionToLoopPassAdaptor ---------------------------------------- @X = global 4 bytes, align 4 define void @test2(i32 %i) { Entry: %X1 = gep ptr @X, 4 x i64 1 %X2 = gep ptr @X, 4 x i64 1 %X1.promoted = load i32, ptr %X1, align 4 br label %Loop Loop: %A1 = phi i32 [ %V, %Loop ], [ %X1.promoted, %Entry ] %V = add i32 %A1, 1 br i1 0, label %Loop, label %Exit Exit: %V.lcssa = phi i32 [ %V, %Loop ] store i32 %V.lcssa, ptr %X1, align 4 ret void } Transformation seems to be correct! (syntactically equal) -- 28. PassManager<Function> : Skipping NOP -- 29. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 30. FunctionToLoopPassAdaptor ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 31. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 32. LoopSimplifyPass ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 33. LoopSimplifyPass ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 34. LCSSAPass ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 35. LCSSAPass ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 36. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 37. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 38. LICMPass ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 39. LICMPass ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 40. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 41. FunctionToLoopPassAdaptor ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 42. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %x = load volatile i32, ptr @X, align 4 -- 43. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 44. FunctionToLoopPassAdaptor ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 45. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 46. LoopSimplifyPass ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 47. LoopSimplifyPass ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 48. LCSSAPass ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 49. LCSSAPass ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 50. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 51. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 52. LICMPass ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 53. LICMPass ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 54. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 55. FunctionToLoopPassAdaptor ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 56. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: store volatile i32 %x2, ptr @X, align 4 -- 57. PassManager<Function> : Skipping NOP -- 58. FunctionToLoopPassAdaptor ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 br label %subloop subloop: %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] %offsetx2 = load ptr, ptr %handle2, align 8 store i8 %n, ptr %offsetx2, align 1 %newoffsetx2 = gep ptr %offsetx2, 1 x i64 -1 store ptr %newoffsetx2, ptr %handle2, align 8 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 59. PassManager<Function> : Skipping NOP -- 60. LoopSimplifyPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 br label %subloop subloop: %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] %offsetx2 = load ptr, ptr %handle2, align 8 store i8 %n, ptr %offsetx2, align 1 %newoffsetx2 = gep ptr %offsetx2, 1 x i64 -1 store ptr %newoffsetx2, ptr %handle2, align 8 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 61. LoopSimplifyPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 br label %subloop subloop: %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] %offsetx2 = load ptr, ptr %handle2, align 8 store i8 %n, ptr %offsetx2, align 1 %newoffsetx2 = gep ptr %offsetx2, 1 x i64 -1 store ptr %newoffsetx2, ptr %handle2, align 8 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 62. LCSSAPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 br label %subloop subloop: %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] %offsetx2 = load ptr, ptr %handle2, align 8 store i8 %n, ptr %offsetx2, align 1 %newoffsetx2 = gep ptr %offsetx2, 1 x i64 -1 store ptr %newoffsetx2, ptr %handle2, align 8 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 63. LCSSAPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 br label %subloop subloop: %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] %offsetx2 = load ptr, ptr %handle2, align 8 store i8 %n, ptr %offsetx2, align 1 %newoffsetx2 = gep ptr %offsetx2, 1 x i64 -1 store ptr %newoffsetx2, ptr %handle2, align 8 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 64. PassManager<Function> : Skipping NOP -- 65. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 66. LICMPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 br label %subloop subloop: %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] %offsetx2 = load ptr, ptr %handle2, align 8 store i8 %n, ptr %offsetx2, align 1 %newoffsetx2 = gep ptr %offsetx2, 1 x i64 -1 store ptr %newoffsetx2, ptr %handle2, align 8 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 67. LICMPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 br label %subloop subloop: %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] %offsetx2 = load ptr, ptr %handle2, align 8 store i8 %n, ptr %offsetx2, align 1 %newoffsetx2 = gep ptr %offsetx2, 1 x i64 -1 store ptr %newoffsetx2, ptr %handle2, align 8 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } => define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 %handle2.promoted = load ptr, ptr %handle2, align 8 br label %subloop subloop: %newoffsetx21 = phi ptr [ %handle2.promoted, %loop ], [ %newoffsetx2, %subloop ] %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] store i8 %n, ptr %newoffsetx21, align 1 %newoffsetx2 = gep ptr %newoffsetx21, 1 x i64 -1 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %newoffsetx2.lcssa = phi ptr [ %newoffsetx2, %subloop ] store ptr %newoffsetx2.lcssa, ptr %handle2, align 8 %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: 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 -- 68. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 69. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 70. LICMPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 %handle2.promoted = load ptr, ptr %handle2, align 8 br label %subloop subloop: %newoffsetx21 = phi ptr [ %handle2.promoted, %loop ], [ %newoffsetx2, %subloop ] %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] store i8 %n, ptr %newoffsetx21, align 1 %newoffsetx2 = gep ptr %newoffsetx21, 1 x i64 -1 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %newoffsetx2.lcssa = phi ptr [ %newoffsetx2, %subloop ] store ptr %newoffsetx2.lcssa, ptr %handle2, align 8 %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } Transformation seems to be correct! (syntactically equal) -- 71. LICMPass ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 br label %loop loop: %tmp = gep ptr %x, 1 x i64 8 store ptr %tmp, ptr %handle2, align 8 %handle2.promoted = load ptr, ptr %handle2, align 8 br label %subloop subloop: %newoffsetx21 = phi ptr [ %handle2.promoted, %loop ], [ %newoffsetx2, %subloop ] %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] store i8 %n, ptr %newoffsetx21, align 1 %newoffsetx2 = gep ptr %newoffsetx21, 1 x i64 -1 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %newoffsetx2.lcssa = phi ptr [ %newoffsetx2, %subloop ] store ptr %newoffsetx2.lcssa, ptr %handle2, align 8 %offsetx1 = load ptr, ptr %handle1, align 8 %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: ret void } => define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 %tmp = gep ptr %x, 1 x i64 8 %offsetx1 = load ptr, ptr %handle1, align 8 br label %loop loop: br label %subloop subloop: %newoffsetx21 = phi ptr [ %tmp, %loop ], [ %newoffsetx2, %subloop ] %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] store i8 %n, ptr %newoffsetx21, align 1 %newoffsetx2 = gep ptr %newoffsetx21, 1 x i64 -1 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %newoffsetx2.lcssa = phi ptr [ %newoffsetx2, %subloop ] %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: %newoffsetx2.lcssa.lcssa = phi ptr [ %newoffsetx2.lcssa, %innerexit ] store ptr %newoffsetx2.lcssa.lcssa, ptr %handle2, align 8 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 -- 72. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 73. FunctionToLoopPassAdaptor ---------------------------------------- define void @test4(ptr %x, i8 %n) { #0: %handle1 = alloca i64 8, align 8 %handle2 = alloca i64 8, align 8 store ptr %x, ptr %handle1, align 8 %tmp = gep ptr %x, 1 x i64 8 %offsetx1 = load ptr, ptr %handle1, align 8 br label %loop loop: br label %subloop subloop: %newoffsetx21 = phi ptr [ %tmp, %loop ], [ %newoffsetx2, %subloop ] %count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ] store i8 %n, ptr %newoffsetx21, align 1 %newoffsetx2 = gep ptr %newoffsetx21, 1 x i64 -1 %nextcount = add i8 %count, 1 %innerexitcond = icmp sge i8 %nextcount, 8 br i1 %innerexitcond, label %innerexit, label %subloop innerexit: %newoffsetx2.lcssa = phi ptr [ %newoffsetx2, %subloop ] %val = load i8, ptr %offsetx1, align 1 %cond = icmp eq i8 %val, %n br i1 %cond, label %exit, label %loop exit: %newoffsetx2.lcssa.lcssa = phi ptr [ %newoffsetx2.lcssa, %innerexit ] store ptr %newoffsetx2.lcssa.lcssa, ptr %handle2, align 8 ret void } Transformation seems to be correct! (syntactically equal) -- 74. PassManager<Function> : Skipping NOP -- 75. PassManager<Function> : Skipping NOP ERROR: Unsupported attribute: noalias -- 76. FunctionToLoopPassAdaptor ERROR: Unsupported attribute: noalias -- 77. PassManager<Function> : Skipping NOP ERROR: Unsupported attribute: noalias -- 78. LoopSimplifyPass ERROR: Unsupported attribute: noalias -- 79. LoopSimplifyPass ERROR: Unsupported attribute: noalias -- 80. LCSSAPass ERROR: Unsupported attribute: noalias -- 81. LCSSAPass ERROR: Unsupported attribute: noalias -- 82. PassManager<Function> : Skipping NOP ERROR: Unsupported attribute: noalias -- 83. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported attribute: noalias -- 84. LICMPass ERROR: Unsupported attribute: noalias -- 85. LICMPass ERROR: Unsupported attribute: noalias -- 86. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported attribute: noalias -- 87. FunctionToLoopPassAdaptor ERROR: Unsupported attribute: noalias -- 88. PassManager<Function> : Skipping NOP ERROR: Unsupported attribute: noalias -- 89. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 90. FunctionToLoopPassAdaptor ERROR: Unsupported metadata: 1 -- 91. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 92. LoopSimplifyPass ERROR: Unsupported metadata: 1 -- 93. LoopSimplifyPass ERROR: Unsupported metadata: 1 -- 94. LCSSAPass ERROR: Unsupported metadata: 1 -- 95. LCSSAPass ERROR: Unsupported metadata: 1 -- 96. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 97. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported metadata: 1 -- 98. LICMPass ERROR: Unsupported metadata: 1 -- 99. LICMPass ERROR: Unsupported metadata: 1 -- 100. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported metadata: 1 -- 101. FunctionToLoopPassAdaptor ERROR: Unsupported metadata: 1 -- 102. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 103. PassManager<Function> : Skipping NOP -- 104. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 105. PassManager<Function> : Skipping NOP -- 106. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 107. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 108. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 109. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 110. PassManager<Function> : Skipping NOP -- 111. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 112. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 113. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } => declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x21 = phi i32 [ %local.promoted, %entry ], [ %x2, %loop ] %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x2 = call i32 @opaque(i32 %x21) memory(argmem: readwrite) %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %x2.lcssa = phi i32 [ %x2, %loop ] store i32 %x2.lcssa, ptr %local, align 4 %ret = load i32, ptr %local, align 4 ret i32 %ret } 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 -- 114. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 115. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x21 = phi i32 [ %local.promoted, %entry ], [ %x2, %loop ] %j = phi i32 [ 0, %entry ], [ %next, %loop ] %x2 = call i32 @opaque(i32 %x21) memory(argmem: readwrite) %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %x2.lcssa = phi i32 [ %x2, %loop ] store i32 %x2.lcssa, ptr %local, align 4 %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 116. PassManager<Function> : Skipping NOP -- 117. PassManager<Function> : Skipping NOP -- 118. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 119. PassManager<Function> : Skipping NOP -- 120. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 121. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 122. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 123. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 124. PassManager<Function> : Skipping NOP -- 125. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 126. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 127. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } => declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x22 = phi i32 [ %local.promoted, %entry ], [ %x21, %else ] %j = phi i32 [ 0, %entry ], [ %next, %else ] %x2 = call i32 @opaque(i32 %x22) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %x21 = phi i32 [ %x2, %if ], [ %x22, %loop ] %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } 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 -- 128. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 129. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test7bad() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x22 = phi i32 [ %local.promoted, %entry ], [ %x21, %else ] %j = phi i32 [ 0, %entry ], [ %next, %else ] %x2 = call i32 @opaque(i32 %x22) memory(argmem: readwrite) %cmp = icmp eq i32 %x2, 0 br i1 %cmp, label %if, label %else if: store i32 %x2, ptr %local, align 4 br label %else else: %x21 = phi i32 [ %x2, %if ], [ %x22, %loop ] %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 130. PassManager<Function> : Skipping NOP -- 131. PassManager<Function> : Skipping NOP -- 132. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 133. PassManager<Function> : Skipping NOP -- 134. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 135. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 136. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 137. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 138. PassManager<Function> : Skipping NOP -- 139. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 140. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 141. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x = load i32, ptr %local, align 4 %x2 = call i32 @opaque(i32 %x) memory(argmem: readwrite) store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } => declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x21 = phi i32 [ %local.promoted, %entry ], [ %x2, %loop ] %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x2 = call i32 @opaque(i32 %x21) memory(argmem: readwrite) %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %x2.lcssa = phi i32 [ %x2, %loop ] store i32 %x2.lcssa, ptr %local, align 4 %ret = load i32, ptr %local, align 4 ret i32 %ret } 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 ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test8() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x21 = phi i32 [ %local.promoted, %entry ], [ %x2, %loop ] %j = phi i32 [ 0, %entry ], [ %next, %loop ] %throwaway = call i32 @opaque(i32 %j) memory(argmem: readwrite) %x2 = call i32 @opaque(i32 %x21) memory(argmem: readwrite) %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %x2.lcssa = phi i32 [ %x2, %loop ] store i32 %x2.lcssa, ptr %local, align 4 %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 144. PassManager<Function> : Skipping NOP -- 145. PassManager<Function> : Skipping NOP -- 146. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %local, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 147. PassManager<Function> : Skipping NOP -- 148. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %local, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 149. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %local, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 150. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %local, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 151. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %local, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 152. PassManager<Function> : Skipping NOP -- 153. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 154. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %local, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 155. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %local, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %local, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %local, align 4 ret i32 %ret } => declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x21 = phi i32 [ %local.promoted, %entry ], [ %x2, %else ] %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x21, %if ] %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %x2.lcssa = phi i32 [ %x2, %else ] store i32 %x2.lcssa, ptr %local, align 4 %ret = load i32, ptr %local, align 4 ret i32 %ret } 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 -- 156. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 157. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9() { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %local.promoted = load i32, ptr %local, align 4 br label %loop loop: %x21 = phi i32 [ %local.promoted, %entry ], [ %x2, %else ] %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x21, %if ] %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %x2.lcssa = phi i32 [ %x2, %else ] store i32 %x2.lcssa, ptr %local, align 4 %ret = load i32, ptr %local, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 158. PassManager<Function> : Skipping NOP -- 159. PassManager<Function> : Skipping NOP -- 160. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 161. PassManager<Function> : Skipping NOP -- 162. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 163. LoopSimplifyPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 164. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 165. LCSSAPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 166. PassManager<Function> : Skipping NOP -- 167. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 168. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 169. LICMPass ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 170. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 171. FunctionToLoopPassAdaptor ---------------------------------------- declare void @capture(ptr) declare i32 @opaque(i32) memory(argmem: readwrite) define i32 @test9bad(i32 %i) { entry: %local = alloca i64 4, align 4 call void @capture(ptr %local) %notderef = gep ptr %local, 4 x i32 %i br label %loop loop: %j = phi i32 [ 0, %entry ], [ %next, %else ] %j2 = call i32 @opaque(i32 %j) memory(argmem: readwrite) %cmp = icmp eq i32 %j2, 0 br i1 %cmp, label %if, label %else if: %x = load i32, ptr %notderef, align 4 br label %else else: %x2 = phi i32 [ 0, %loop ], [ %x, %if ] store i32 %x2, ptr %notderef, align 4 %next = add i32 %j, 1 %cond = icmp eq i32 %next, 0 br i1 %cond, label %exit, label %loop exit: %ret = load i32, ptr %notderef, align 4 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 172. PassManager<Function> : Skipping NOP -- 173. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 174. FunctionToLoopPassAdaptor ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 175. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 176. LoopSimplifyPass ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 177. LoopSimplifyPass ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 178. LCSSAPass ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 179. LCSSAPass ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 180. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 181. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 182. LICMPass ERROR: Unsupported instruction: %x = load atomic i32, ptr @X unordered, align 4 -- 183. LICMPass ERROR: Unsupported instruction: %X.promoted = load atomic i32, ptr @X unordered, align 4 -- 184. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP ERROR: Unsupported instruction: %X.promoted = load atomic i32, ptr @X unordered, align 4 -- 185. FunctionToLoopPassAdaptor ERROR: Unsupported instruction: %X.promoted = load atomic i32, ptr @X unordered, align 4 -- 186. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %X.promoted = load atomic i32, ptr @X unordered, align 4 -- 187. PassManager<Function> : Skipping NOP -- 188. FunctionToLoopPassAdaptor ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void Early: ret void } Transformation seems to be correct! (syntactically equal) -- 189. PassManager<Function> : Skipping NOP -- 190. LoopSimplifyPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void Early: ret void } Transformation seems to be correct! (syntactically equal) -- 191. LoopSimplifyPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void Early: ret void } Transformation seems to be correct! (syntactically equal) -- 192. LCSSAPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void Early: ret void } Transformation seems to be correct! (syntactically equal) -- 193. LCSSAPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void Early: ret void } Transformation seems to be correct! (syntactically equal) -- 194. PassManager<Function> : Skipping NOP -- 195. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 196. LICMPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void Early: ret void } Transformation seems to be correct! (syntactically equal) -- 197. LICMPass ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: br label %Loop Loop: %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x = load i32, ptr @X, align 4 %x2 = add i32 %x, 1 store i32 %x2, ptr @X, align 4 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: ret void Early: ret void } => @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: %X.promoted = load i32, ptr @X, align 4 br label %Loop Loop: %x21 = phi i32 [ %X.promoted, %Entry ], [ %x2, %body ] %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x2 = add i32 %x21, 1 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: %x2.lcssa = phi i32 [ %x2, %body ] store i32 %x2.lcssa, ptr @X, align 4 ret void Early: %x21.lcssa = phi i32 [ %x21, %Loop ] store i32 %x21.lcssa, ptr @X, align 4 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 -- 198. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 199. FunctionToLoopPassAdaptor ---------------------------------------- @X = global 4 bytes, align 4 define void @test11(i32 %i) { Entry: %X.promoted = load i32, ptr @X, align 4 br label %Loop Loop: %x21 = phi i32 [ %X.promoted, %Entry ], [ %x2, %body ] %j = phi i32 [ 0, %Entry ], [ %Next, %body ] %early.test = icmp ult i32 %j, 32 br i1 %early.test, label %body, label %Early body: %x2 = add i32 %x21, 1 %Next = add i32 %j, 1 %cond = icmp eq i32 %Next, 0 br i1 %cond, label %Out, label %Loop Out: %x2.lcssa = phi i32 [ %x2, %body ] store i32 %x2.lcssa, ptr @X, align 4 ret void Early: %x21.lcssa = phi i32 [ %x21, %Loop ] store i32 %x21.lcssa, ptr @X, align 4 ret void } Transformation seems to be correct! (syntactically equal) -- 200. PassManager<Function> : Skipping NOP -- 201. PassManager<Function> : Skipping NOP -- 202. FunctionToLoopPassAdaptor ---------------------------------------- define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: ret i8 %i } Transformation seems to be correct! (syntactically equal) -- 203. PassManager<Function> : Skipping NOP -- 204. LoopSimplifyPass ---------------------------------------- define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: ret i8 %i } Transformation seems to be correct! (syntactically equal) -- 205. LoopSimplifyPass ---------------------------------------- define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: ret i8 %i } Transformation seems to be correct! (syntactically equal) -- 206. LCSSAPass ---------------------------------------- define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: ret i8 %i } Transformation seems to be correct! (syntactically equal) -- 207. LCSSAPass ---------------------------------------- define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: ret i8 %i } => define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: %i.lcssa = phi i8 [ %i, %loop.header ] ret i8 %i.lcssa } Transformation seems to be correct! -- 208. PassManager<Function> : Skipping NOP -- 209. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP -- 210. LICMPass ---------------------------------------- define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: %i.lcssa = phi i8 [ %i, %loop.header ] ret i8 %i.lcssa } Transformation seems to be correct! (syntactically equal) -- 211. LICMPass ---------------------------------------- define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: br label %loop.header loop.header: %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: %div = sdiv i8 %i, 3 %inc = load i8, ptr dereferenceable(8) %ptr, align 1 store i8 %inc, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc br label %loop.header exit: %i.lcssa = phi i8 [ %i, %loop.header ] ret i8 %i.lcssa } => define i8 @test_hoistable_existing_load_sinkable_store_writeonly(ptr dereferenceable(8) %ptr, i8 %start) memory(write) { entry: %ptr.promoted = load i8, ptr dereferenceable(8) %ptr, align 1 br label %loop.header loop.header: %inc1 = phi i8 [ %ptr.promoted, %entry ], [ %inc1, %loop.latch ] %i = phi i8 [ %start, %entry ], [ %add, %loop.latch ] %cmp = icmp ult i8 %i, 4 br i1 %cmp, label %loop.latch, label %exit loop.latch: store i8 %inc1, ptr dereferenceable(8) %ptr, align 1 %add = add i8 %i, %inc1 br label %loop.header exit: %i.lcssa = phi i8 [ %i, %loop.header ] ret i8 %i.lcssa } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: ptr dereferenceable(8) %ptr = pointer(non-local, block_id=1, offset=1, attrs=1) i8 %start = #x04 (4) Source: >> Jump to %loop.header i8 %i = #x04 (4) i1 %cmp = #x0 (0) >> Jump to %exit i8 %i.lcssa = #x04 (4) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0 Block 1 > size: 12 align: 1 alloc type: 0 alive: true address: 1 Target: i8 %ptr.promoted = UB triggered! Pass: LICMPass 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=licm' '-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_d02VwZ9Q_5ndn.bc" ------------------- SMT STATS ------------------- Num queries: 24 Num invalid: 0 Num skips: 0 Num trivial: 30 (55.6%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 18 (75.0%) Num UNSAT: 6 (25.0%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/LICM/scalar-promote.ll -passes=licm -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LICM/scalar-promote.ll + /home/nlopes/alive2/build/opt-alive.sh -passes=licm -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LICM/scalar-promote.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/LICM/scalar-promote.ll