Test source: git
Comments: LLVM bug: memcpy -> load/store
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) ERROR: Unsupported metadata: 1 ERROR: Unsupported metadata: 1 ERROR: Unsupported instruction: %fptr.as1 = addrspacecast ptr %a to ptr addrspace(1) ERROR: Unsupported metadata: 1 ERROR: Unsupported metadata: 1 ERROR: Unsupported metadata: 1 ERROR: Unsupported metadata: 1 ERROR: Unsupported metadata: 1 ERROR: Unsupported instruction: %cast1 = addrspacecast ptr %x to ptr addrspace(1) ERROR: Unsupported metadata: 1 ERROR: Unsupported instruction: store volatile i16 42, ptr %a, align 2 ERROR: Unsupported instruction: store volatile i16 42, ptr %a, align 2 ERROR: Unsupported instruction: store atomic volatile i64 0, ptr %ptr seq_cst, align 8 ERROR: Unsupported instruction: %v = load atomic volatile i32, ptr %a seq_cst, align 4 ERROR: Unsupported instruction: %v = load volatile i32, ptr %a, align 4 ERROR: Unsupported instruction: %v = load atomic i32, ptr %a seq_cst, align 4 -- 1. PassManager<Function> : Skipping NOP -- 2. SROAPass ---------------------------------------- define i32 @test0() { entry: %a1 = alloca i64 4, align 4, dead %a2 = alloca i64 4, align 4, dead start_lifetime ptr %a1 store i32 0, ptr %a1, align 4 %v1 = load i32, ptr %a1, align 4 end_lifetime ptr %a1 start_lifetime ptr %a2 store float 0.000000, ptr %a2, align 4 %v2 = load float, ptr %a2, align 4 %v2.int = bitcast float %v2 to i32 %sum1 = add i32 %v1, %v2.int end_lifetime ptr %a2 ret i32 %sum1 } Transformation seems to be correct! (syntactically equal) -- 3. SROAPass ---------------------------------------- define i32 @test0() { entry: %a1 = alloca i64 4, align 4, dead %a2 = alloca i64 4, align 4, dead start_lifetime ptr %a1 store i32 0, ptr %a1, align 4 %v1 = load i32, ptr %a1, align 4 end_lifetime ptr %a1 start_lifetime ptr %a2 store float 0.000000, ptr %a2, align 4 %v2 = load float, ptr %a2, align 4 %v2.int = bitcast float %v2 to i32 %sum1 = add i32 %v1, %v2.int end_lifetime ptr %a2 ret i32 %sum1 } => define i32 @test0() { entry: %v2.int = bitcast float 0.000000 to i32 %sum1 = add i32 0, %v2.int ret i32 %sum1 } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. SROAPass ---------------------------------------- define i32 @test1() { entry: %X = alloca i64 8, align 8 %Y = gep ptr %X, 8 x i64 0, 1 x i64 0 store i32 0, ptr %Y, align 4 %Z = load i32, ptr %Y, align 4 ret i32 %Z } Transformation seems to be correct! (syntactically equal) -- 7. SROAPass ---------------------------------------- define i32 @test1() { entry: %X = alloca i64 8, align 8 %Y = gep ptr %X, 8 x i64 0, 1 x i64 0 store i32 0, ptr %Y, align 8 %Z = load i32, ptr %Y, align 8 ret i32 %Z } => define i32 @test1() { entry: ret i32 0 } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. SROAPass ---------------------------------------- define i64 @test2(i64 %X) { entry: %A = alloca i64 8, align 1 store i64 %X, ptr %A, align 4 br label %L2 L2: %Z = load i64, ptr %A, align 4 ret i64 %Z } Transformation seems to be correct! (syntactically equal) -- 11. SROAPass ---------------------------------------- define i64 @test2(i64 %X) { entry: %A = alloca i64 8, align 1 store i64 %X, ptr %A, align 4 br label %L2 L2: %Z = load i64, ptr %A, align 4 ret i64 %Z } => define i64 @test2(i64 %X) { entry: br label %L2 L2: ret i64 %X } **************************************** 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! -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) -- 14. SROAPass ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) -- 15. SROAPass -- 16. PassManager<Function> : Skipping NOP -- 17. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) -- 18. SROAPass ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) -- 19. SROAPass -- 20. PassManager<Function> : Skipping NOP -- 21. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) -- 22. SROAPass ERROR: Unsupported instruction: %B = addrspacecast ptr %A to ptr addrspace(1) -- 23. SROAPass ERROR: Unsupported instruction: %A.sroa.0.2.gepB.sroa_cast = addrspacecast ptr %A.sroa.0.2.gepB.sroa_idx to pt -- 24. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %A.sroa.0.2.gepB.sroa_cast = addrspacecast ptr %A.sroa.0.2.gepB.sroa_idx to pt -- 25. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 26. SROAPass ERROR: Unsupported metadata: 1 -- 27. SROAPass ERROR: Unsupported metadata: 1 -- 28. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 29. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 30. SROAPass ERROR: Unsupported metadata: 1 -- 31. SROAPass ERROR: Unsupported metadata: 1 -- 32. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 33. PassManager<Function> : Skipping NOP -- 34. SROAPass ---------------------------------------- define i16 @test5() { entry: %a = alloca i64 4, align 1 store float 0.000000, ptr %a, align 4 %ptr = gep ptr %a, 4 x i32 0, 1 x i32 2 %val = load i16, ptr %ptr, align 2 ret i16 %val } Transformation seems to be correct! (syntactically equal) -- 35. SROAPass ---------------------------------------- define i16 @test5() { entry: %a = alloca i64 4, align 1 store float 0.000000, ptr %a, align 4 %ptr = gep ptr %a, 4 x i32 0, 1 x i32 2 %val = load i16, ptr %ptr, align 2 ret i16 %val } => define i16 @test5() { entry: %#0 = bitcast float 0.000000 to i32 %a.sroa.0.2.extract.shift = lshr i32 %#0, 16 %a.sroa.0.2.extract.trunc = trunc i32 %a.sroa.0.2.extract.shift to i16 ret i16 %a.sroa.0.2.extract.trunc } **************************************** 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! -- 36. PassManager<Function> : Skipping NOP -- 37. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %fptr.as1 = addrspacecast ptr %a to ptr addrspace(1) -- 38. SROAPass ERROR: Unsupported instruction: %fptr.as1 = addrspacecast ptr %a to ptr addrspace(1) -- 39. SROAPass -- 40. PassManager<Function> : Skipping NOP -- 41. PassManager<Function> : Skipping NOP -- 42. SROAPass ---------------------------------------- define i32 @test6() { entry: %a = alloca i64 4, align 1 memset ptr %a align 1, i8 42, i32 4 %val = load i32, ptr %a, align 4 ret i32 %val } Transformation seems to be correct! (syntactically equal) -- 43. SROAPass ERROR: Unsupported instruction: store volatile i32 707406378, ptr %a.sroa.0, align 4 -- 44. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: store volatile i32 707406378, ptr %a.sroa.0, align 4 -- 45. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 46. SROAPass ERROR: Unsupported metadata: 1 -- 47. SROAPass ERROR: Unsupported instruction: %a.sroa.0.0.copyload = load volatile i32, ptr %src, align 1, !tbaa !0 -- 48. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %a.sroa.0.0.copyload = load volatile i32, ptr %src, align 1, !tbaa !0 -- 49. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 50. SROAPass ERROR: Unsupported metadata: 1 -- 51. SROAPass ERROR: Unsupported metadata: 1 -- 52. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 53. PassManager<Function> : Skipping NOP -- 54. SROAPass ---------------------------------------- define i64 @test9() { entry: %a = alloca i64 3, align 8 store i8 0, ptr %a, align 1 %gep2 = gep inbounds ptr %a, 3 x i32 0, 1 x i64 0, 1 x i32 1 store i8 0, ptr %gep2, align 1 %gep3 = gep inbounds ptr %a, 3 x i32 0, 1 x i64 0, 1 x i32 2 store i8 26, ptr %gep3, align 1 %load = load i64, ptr %a, align 4 %result = and i64 %load, 16777215 ret i64 %result } Transformation seems to be correct! (syntactically equal) -- 55. SROAPass ---------------------------------------- define i64 @test9() { entry: %a = alloca i64 3, align 8 store i8 0, ptr %a, align 8 %gep2 = gep inbounds ptr %a, 3 x i32 0, 1 x i64 0, 1 x i32 1 store i8 0, ptr %gep2, align 1 %gep3 = gep inbounds ptr %a, 3 x i32 0, 1 x i64 0, 1 x i32 2 store i8 26, ptr %gep3, align 2 %load = load i64, ptr %a, align 8 %result = and i64 %load, 16777215 ret i64 %result } => define i64 @test9() { entry: %a.sroa.3.0.insert.ext = zext i8 26 to i64 %a.sroa.3.0.insert.shift = shl i64 %a.sroa.3.0.insert.ext, 16 %a.sroa.3.0.insert.mask = and i64 undef, -16711681 %a.sroa.3.0.insert.insert = or i64 %a.sroa.3.0.insert.mask, %a.sroa.3.0.insert.shift %a.sroa.2.0.insert.ext = zext i8 0 to i64 %a.sroa.2.0.insert.shift = shl i64 %a.sroa.2.0.insert.ext, 8 %a.sroa.2.0.insert.mask = and i64 %a.sroa.3.0.insert.insert, -65281 %a.sroa.2.0.insert.insert = or i64 %a.sroa.2.0.insert.mask, %a.sroa.2.0.insert.shift %a.sroa.0.0.insert.ext = zext i8 0 to i64 %a.sroa.0.0.insert.mask = and i64 %a.sroa.2.0.insert.insert, -256 %a.sroa.0.0.insert.insert = or i64 %a.sroa.0.0.insert.mask, %a.sroa.0.0.insert.ext %result = and i64 %a.sroa.0.0.insert.insert, 16777215 ret i64 %result } Transformation seems to be correct! -- 56. PassManager<Function> : Skipping NOP -- 57. PassManager<Function> : Skipping NOP -- 58. SROAPass ---------------------------------------- define ptr @test10() { entry: %a = alloca i64 8, align 1 memset ptr %a align 1, i8 0, i32 8 %s2ptr = load ptr, ptr %a, align 8 ret ptr %s2ptr } Transformation seems to be correct! (syntactically equal) -- 59. SROAPass ---------------------------------------- define ptr @test10() { entry: %a = alloca i64 8, align 1 memset ptr %a align 1, i8 0, i32 8 %s2ptr = load ptr, ptr %a, align 8 ret ptr %s2ptr } => define ptr @test10() { entry: ret ptr null } **************************************** 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! -- 60. PassManager<Function> : Skipping NOP -- 61. PassManager<Function> : Skipping NOP -- 62. SROAPass ---------------------------------------- define i32 @test11(i1 %c1) { entry: %X = alloca i64 4, align 4 br i1 %c1, label %good, label %bad bad: %Y2 = gep ptr %X, 4 x i64 1 store i32 0, ptr %Y2, align 4 %Z2 = load i32, ptr %Y2, align 4 ret i32 %Z2 good: store i32 0, ptr %X, align 4 %Z = load i32, ptr %X, align 4 ret i32 %Z } Transformation seems to be correct! (syntactically equal) -- 63. SROAPass ---------------------------------------- define i32 @test11(i1 %c1) { entry: %X = alloca i64 4, align 4 br i1 %c1, label %good, label %bad bad: %Y2 = gep ptr %X, 4 x i64 1 store i32 0, ptr %Y2, align 4 %Z2 = load i32, ptr %Y2, align 4 ret i32 %Z2 good: store i32 0, ptr %X, align 4 %Z = load i32, ptr %X, align 4 ret i32 %Z } => define i32 @test11(i1 %c1) { entry: br i1 %c1, label %good, label %bad bad: ret i32 poison good: ret i32 0 } Transformation seems to be correct! -- 64. PassManager<Function> : Skipping NOP -- 65. PassManager<Function> : Skipping NOP -- 66. SROAPass ---------------------------------------- define i8 @test12() { entry: %a = alloca i64 3, align 1 %b = alloca i64 3, align 1 store i8 0, ptr %a, align 1 %a1ptr = gep ptr %a, 3 x i64 0, 1 x i32 1 store i8 0, ptr %a1ptr, align 1 %a2ptr = gep ptr %a, 3 x i64 0, 1 x i32 2 store i8 0, ptr %a2ptr, align 1 %ai = load i24, ptr %a, align 4 store i24 %ai, ptr %b, align 4 %b0 = load i8, ptr %b, align 1 %b1ptr = gep ptr %b, 3 x i64 0, 1 x i32 1 %b1 = load i8, ptr %b1ptr, align 1 %b2ptr = gep ptr %b, 3 x i64 0, 1 x i32 2 %b2 = load i8, ptr %b2ptr, align 1 %bsum0 = add i8 %b0, %b1 %bsum1 = add i8 %bsum0, %b2 ret i8 %bsum1 } Transformation seems to be correct! (syntactically equal) -- 67. SROAPass ---------------------------------------- define i8 @test12() { entry: %a = alloca i64 3, align 1 %b = alloca i64 3, align 1 store i8 0, ptr %a, align 1 %a1ptr = gep ptr %a, 3 x i64 0, 1 x i32 1 store i8 0, ptr %a1ptr, align 1 %a2ptr = gep ptr %a, 3 x i64 0, 1 x i32 2 store i8 0, ptr %a2ptr, align 1 %ai = load i24, ptr %a, align 4 store i24 %ai, ptr %b, align 4 %b0 = load i8, ptr %b, align 1 %b1ptr = gep ptr %b, 3 x i64 0, 1 x i32 1 %b1 = load i8, ptr %b1ptr, align 1 %b2ptr = gep ptr %b, 3 x i64 0, 1 x i32 2 %b2 = load i8, ptr %b2ptr, align 1 %bsum0 = add i8 %b0, %b1 %bsum1 = add i8 %bsum0, %b2 ret i8 %bsum1 } => define i8 @test12() { entry: %a.sroa.3.0.insert.ext = zext i8 0 to i24 %a.sroa.3.0.insert.shift = shl i24 %a.sroa.3.0.insert.ext, 16 %a.sroa.3.0.insert.mask = and i24 undef, 65535 %a.sroa.3.0.insert.insert = or i24 %a.sroa.3.0.insert.mask, %a.sroa.3.0.insert.shift %a.sroa.2.0.insert.ext = zext i8 0 to i24 %a.sroa.2.0.insert.shift = shl i24 %a.sroa.2.0.insert.ext, 8 %a.sroa.2.0.insert.mask = and i24 %a.sroa.3.0.insert.insert, 16711935 %a.sroa.2.0.insert.insert = or i24 %a.sroa.2.0.insert.mask, %a.sroa.2.0.insert.shift %a.sroa.0.0.insert.ext = zext i8 0 to i24 %a.sroa.0.0.insert.mask = and i24 %a.sroa.2.0.insert.insert, 16776960 %a.sroa.0.0.insert.insert = or i24 %a.sroa.0.0.insert.mask, %a.sroa.0.0.insert.ext %b.sroa.0.0.extract.trunc = trunc i24 %a.sroa.0.0.insert.insert to i8 %b.sroa.2.0.extract.shift = lshr i24 %a.sroa.0.0.insert.insert, 8 %b.sroa.2.0.extract.trunc = trunc i24 %b.sroa.2.0.extract.shift to i8 %b.sroa.3.0.extract.shift = lshr i24 %a.sroa.0.0.insert.insert, 16 %b.sroa.3.0.extract.trunc = trunc i24 %b.sroa.3.0.extract.shift to i8 %bsum0 = add i8 %b.sroa.0.0.extract.trunc, %b.sroa.2.0.extract.trunc %bsum1 = add i8 %bsum0, %b.sroa.3.0.extract.trunc ret i8 %bsum1 } **************************************** 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! -- 68. PassManager<Function> : Skipping NOP -- 69. PassManager<Function> : Skipping NOP -- 70. SROAPass ---------------------------------------- define i32 @test13() { entry: %a = alloca i64 3, align 2 store i8 0, ptr %a, align 1 %b1ptr = gep ptr %a, 3 x i64 0, 1 x i32 1 store i8 0, ptr %b1ptr, align 1 %b2ptr = gep ptr %a, 3 x i64 0, 1 x i32 2 store i8 0, ptr %b2ptr, align 1 %iptrgep = gep ptr %a, 2 x i64 1 %i = load i16, ptr %iptrgep, align 2 %ret = zext i16 %i to i32 ret i32 %ret } Transformation seems to be correct! (syntactically equal) -- 71. SROAPass ---------------------------------------- define i32 @test13() { entry: %a = alloca i64 3, align 2 store i8 0, ptr %a, align 2 %b1ptr = gep ptr %a, 3 x i64 0, 1 x i32 1 store i8 0, ptr %b1ptr, align 1 %b2ptr = gep ptr %a, 3 x i64 0, 1 x i32 2 store i8 0, ptr %b2ptr, align 2 %iptrgep = gep ptr %a, 2 x i64 1 %i = load i16, ptr %iptrgep, align 2 %ret = zext i16 %i to i32 ret i32 %ret } => define i32 @test13() { entry: %a.sroa.2.2.load.ext = zext i8 0 to i16 %ret = zext i16 %a.sroa.2.2.load.ext to i32 ret i32 %ret } Transformation seems to be correct! -- 72. PassManager<Function> : Skipping NOP -- 73. PassManager<Function> : Skipping NOP -- 74. SROAPass ---------------------------------------- define void @test14(...) { entry: %a = alloca i64 12, align 8 %p = alloca i64 8, align 8 %#0 = gep ptr %a, 1 x i64 12 %#1 = load i32, ptr %a, align 4 store i32 %#1, ptr %#0, align 4 %#2 = gep inbounds ptr %#0, 4 x i32 1 %#3 = gep inbounds ptr %a, 4 x i32 1 %#4 = load i32, ptr %#3, align 4 store i32 %#4, ptr %#2, align 4 %#5 = gep inbounds ptr %#0, 4 x i32 2 %#6 = gep inbounds ptr %a, 4 x i32 2 %#7 = load i32, ptr %#6, align 4 store i32 %#7, ptr %#5, align 4 ret void } Transformation seems to be correct! (syntactically equal) -- 75. SROAPass ---------------------------------------- define void @test14(...) { entry: %a = alloca i64 12, align 8 %p = alloca i64 8, align 8 %#0 = gep ptr %a, 1 x i64 12 %#1 = load i32, ptr %a, align 8 store i32 %#1, ptr %#0, align 4 %#2 = gep inbounds ptr %#0, 4 x i32 1 %#3 = gep inbounds ptr %a, 4 x i32 1 %#4 = load i32, ptr %#3, align 4 store i32 %#4, ptr %#2, align 4 %#5 = gep inbounds ptr %#0, 4 x i32 2 %#6 = gep inbounds ptr %a, 4 x i32 2 %#7 = load i32, ptr %#6, align 8 store i32 %#7, ptr %#5, align 4 ret void } => define void @test14(...) { entry: 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! -- 76. PassManager<Function> : Skipping NOP -- 77. PassManager<Function> : Skipping NOP -- 78. SROAPass ---------------------------------------- define i32 @test15(i1 %flag) { entry: %l0 = alloca i64 8, align 8 %l1 = alloca i64 8, align 8 %l2 = alloca i64 8, align 8 %l3 = alloca i64 8, align 8 br label %loop loop: %dead3 = phi ptr [ %gep3, %loop ], [ null, %entry ] store i64 1879048192, ptr %l0, align 8 %gep0 = gep ptr %l0, 1 x i64 3 store i64 1879048192, ptr %l1, align 8 %gep1 = gep ptr %l1, 1 x i64 3 %dead1 = gep ptr %gep1, 1 x i64 1 store i64 1879048192, ptr %l2, align 8 %gep2.1 = gep ptr %l2, 1 x i64 1 %gep2.2 = gep ptr %l2, 1 x i64 3 %dead2 = select i1 %flag, ptr %gep2.1, ptr %gep2.2 store i64 1879048192, ptr %l3, align 8 %gep3 = gep ptr %l3, 1 x i64 3 br label %loop } Transformation seems to be correct! (syntactically equal) -- 79. SROAPass ---------------------------------------- define i32 @test15(i1 %flag) { entry: %l0 = alloca i64 8, align 8 %l1 = alloca i64 8, align 8 %l2 = alloca i64 8, align 8 %l3 = alloca i64 8, align 8 br label %loop loop: store i64 1879048192, ptr %l0, align 8 store i64 1879048192, ptr %l1, align 8 store i64 1879048192, ptr %l2, align 8 store i64 1879048192, ptr %l3, align 8 br label %loop } => define i32 @test15(i1 %flag) { entry: br label %loop loop: br label %loop } **************************************** 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 -- 80. PassManager<Function> : Skipping NOP -- 81. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 82. SROAPass ERROR: Unsupported metadata: 1 -- 83. SROAPass ERROR: Unsupported metadata: 1 -- 84. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 85. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 86. SROAPass ERROR: Unsupported metadata: 1 -- 87. SROAPass ERROR: Unsupported metadata: 1 -- 88. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 89. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 90. SROAPass ERROR: Unsupported metadata: 1 -- 91. SROAPass ERROR: Unsupported metadata: 1 -- 92. PassManager<Function> : Skipping NOP ERROR: Unsupported metadata: 1 -- 93. PassManager<Function> : Skipping NOP -- 94. SROAPass ---------------------------------------- define i64 @test19(ptr %x) { entry: %a = alloca i64 16, align 8 memcpy ptr %a align 1, ptr %x align 1, i32 16 %gep = gep inbounds ptr %a, 16 x i32 0, 1 x i64 0 %val = load i64, ptr %gep, align 4 ret i64 %val } Transformation seems to be correct! (syntactically equal) -- 95. SROAPass ---------------------------------------- define i64 @test19(ptr %x) { entry: %a = alloca i64 16, align 8 memcpy ptr %a align 8, ptr %x align 1, i32 16 %gep = gep inbounds ptr %a, 16 x i32 0, 1 x i64 0 %val = load i64, ptr %gep, align 8 ret i64 %val } => define i64 @test19(ptr %x) { entry: %a.sroa.0.0.copyload = load i64, ptr %x, align 1 %a.sroa.2.0.x.sroa_idx = gep inbounds ptr %x, 1 x i64 8 %a.sroa.2.0.copyload = load ptr, ptr %a.sroa.2.0.x.sroa_idx, align 1 ret i64 %a.sroa.0.0.copyload } Transformation seems to be correct! -- 96. PassManager<Function> : Skipping NOP -- 97. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %cast1 = addrspacecast ptr %x to ptr addrspace(1) -- 98. SROAPass ERROR: Unsupported instruction: %cast1 = addrspacecast ptr %x to ptr addrspace(1) -- 99. SROAPass ERROR: Unsupported instruction: %cast1 = addrspacecast ptr %x to ptr addrspace(1) -- 100. PassManager<Function> : Skipping NOP ERROR: Unsupported instruction: %cast1 = addrspacecast ptr %x to ptr addrspace(1) -- 101. PassManager<Function> : Skipping NOP -- 102. SROAPass ---------------------------------------- define i32 @test20() { entry: %a = alloca i64 12, align 4 store i32 1, ptr %a, align 4 %gep2.1 = gep ptr %a, 12 x i32 0, 4 x i32 4294967294 %gep2.2 = gep ptr %gep2.1, 4 x i32 3 store i32 2, ptr %gep2.2, align 4 %gep3.1 = gep ptr %a, 12 x i32 0, 4 x i32 14 %gep3.2 = gep ptr %gep3.1, 4 x i32 4294967284 store i32 3, ptr %gep3.2, align 4 %load1 = load i32, ptr %a, align 4 %load2 = load i32, ptr %gep2.2, align 4 %load3 = load i32, ptr %gep3.2, align 4 %sum1 = add i32 %load1, %load2 %sum2 = add i32 %sum1, %load3 ret i32 %sum2 } Transformation seems to be correct! (syntactically equal) -- 103. SROAPass ---------------------------------------- define i32 @test20() { entry: %a = alloca i64 12, align 4 store i32 1, ptr %a, align 4 %gep2.1 = gep ptr %a, 12 x i32 0, 4 x i32 4294967294 %gep2.2 = gep ptr %gep2.1, 4 x i32 3 store i32 2, ptr %gep2.2, align 4 %gep3.1 = gep ptr %a, 12 x i32 0, 4 x i32 14 %gep3.2 = gep ptr %gep3.1, 4 x i32 4294967284 store i32 3, ptr %gep3.2, align 4 %load1 = load i32, ptr %a, align 4 %load2 = load i32, ptr %gep2.2, align 4 %load3 = load i32, ptr %gep3.2, align 4 %sum1 = add i32 %load1, %load2 %sum2 = add i32 %sum1, %load3 ret i32 %sum2 } => define i32 @test20() { entry: %sum1 = add i32 1, 2 %sum2 = add i32 %sum1, 3 ret i32 %sum2 } Transformation seems to be correct! -- 104. PassManager<Function> : Skipping NOP -- 105. PassManager<Function> : Skipping NOP -- 106. SROAPass ---------------------------------------- define i8 @test21() { entry: %a = alloca i64 2305843009213693951, align 1 %gep0 = gep ptr %a, 2305843009213693951 x i64 0, 1 x i64 2305843009213693949 store i8 255, ptr %gep0, align 1 %gep1 = gep ptr %a, 2305843009213693951 x i64 0, 1 x i64 -9223372036854775807 %gep2 = gep ptr %gep1, 1 x i64 -1 memset ptr %gep2 align 1, i8 0, i64 -1 %gep3 = gep ptr %gep1, 1 x i64 9223372036854775807 %gep4 = gep ptr %gep3, 1 x i64 9223372036854775807 %gep5 = gep ptr %gep4, 1 x i64 -6917529027641081857 store i8 255, ptr %gep5, align 1 store i32 0, ptr %gep4, align 4 %load = load i8, ptr %gep0, align 1 %gep6 = gep ptr %gep0, 1 x i32 1 %load2 = load i8, ptr %gep6, align 1 %result = or i8 %load, %load2 ret i8 %result } Transformation seems to be correct! (syntactically equal) -- 107. SROAPass ---------------------------------------- define i8 @test21() { entry: %a = alloca i64 2305843009213693951, align 1 %gep0 = gep ptr %a, 2305843009213693951 x i64 0, 1 x i64 2305843009213693949 store i8 255, ptr %gep0, align 1 %gep1 = gep ptr %a, 2305843009213693951 x i64 0, 1 x i64 -9223372036854775807 %gep2 = gep ptr %gep1, 1 x i64 -1 memset ptr %gep2 align 1, i8 0, i64 -1 %gep3 = gep ptr %gep1, 1 x i64 9223372036854775807 %gep4 = gep ptr %gep3, 1 x i64 9223372036854775807 %gep5 = gep ptr %gep4, 1 x i64 -6917529027641081857 store i8 255, ptr %gep5, align 1 store i32 0, ptr %gep4, align 4 %load = load i8, ptr %gep0, align 1 %gep6 = gep ptr %gep0, 1 x i32 1 %load2 = load i8, ptr %gep6, align 1 %result = or i8 %load, %load2 ret i8 %result } => define i8 @test21() { entry: %result = or i8 255, 255 ret i8 %result } **************************************** 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! -- 108. PassManager<Function> : Skipping NOP -- 109. PassManager<Function> : Skipping NOP -- 110. SROAPass ---------------------------------------- define void @PR13916.1() { entry: %a = alloca i64 1, align 1 memcpy ptr %a align 1, ptr %a align 1, i32 1 %tmp2 = load i8, ptr %a, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 111. SROAPass ---------------------------------------- define void @PR13916.1() { entry: %a = alloca i64 1, align 1 memcpy ptr %a align 1, ptr %a align 1, i32 1 %tmp2 = load i8, ptr %a, align 1 ret void } => define void @PR13916.1() { entry: ret void } Transformation seems to be correct! -- 112. PassManager<Function> : Skipping NOP -- 113. PassManager<Function> : Skipping NOP -- 114. SROAPass ---------------------------------------- define void @PR13916.2(i1 %c1) { entry: %a = alloca i64 1, align 1 br i1 %c1, label %if.then, label %if.end if.then: memcpy ptr %a align 1, ptr %a align 1, i32 1 br label %if.end if.end: %tmp2 = load i8, ptr %a, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 115. SROAPass ---------------------------------------- define void @PR13916.2(i1 %c1) { entry: %a = alloca i64 1, align 1 br i1 %c1, label %if.then, label %if.end if.then: memcpy ptr %a align 1, ptr %a align 1, i32 1 br label %if.end if.end: %tmp2 = load i8, ptr %a, align 1 ret void } => define void @PR13916.2(i1 %c1) { entry: br i1 %c1, label %if.then, label %if.end if.then: br label %if.end if.end: ret void } Transformation seems to be correct! -- 116. PassManager<Function> : Skipping NOP -- 117. PassManager<Function> : Skipping NOP -- 118. SROAPass ---------------------------------------- define void @PR13990(i1 %c1, i1 %c2, i1 %c3, i1 %c4, ptr %ptr) { entry: %tmp1 = alloca i64 8, align 8 %tmp2 = alloca i64 8, align 8 br i1 %c1, label %bb1, label %bb2 bb1: store ptr %ptr, ptr %tmp2, align 8 br i1 %c2, label %bb2, label %bb3 bb2: %tmp50 = select i1 %c3, ptr %tmp2, ptr %tmp1 br i1 %c4, label %bb3, label %bb4 bb4: assume i1 0 bb3: assume i1 0 } Transformation seems to be correct! (syntactically equal) -- 119. SROAPass ---------------------------------------- define void @PR13990(i1 %c1, i1 %c2, i1 %c3, i1 %c4, ptr %ptr) { entry: %tmp1 = alloca i64 8, align 8 %tmp2 = alloca i64 8, align 8 br i1 %c1, label %bb1, label %bb2 bb1: store ptr %ptr, ptr %tmp2, align 8 br i1 %c2, label %bb2, label %bb3 bb2: br i1 %c4, label %bb3, label %bb4 bb4: assume i1 0 bb3: assume i1 0 } => define void @PR13990(i1 %c1, i1 %c2, i1 %c3, i1 %c4, ptr %ptr) { entry: br i1 %c1, label %bb1, label %bb2 bb1: br i1 %c2, label %bb2, label %bb3 bb2: br i1 %c4, label %bb3, label %bb4 bb4: assume i1 0 bb3: assume i1 0 } **************************************** 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! -- 120. PassManager<Function> : Skipping NOP -- 121. PassManager<Function> : Skipping NOP -- 122. SROAPass ---------------------------------------- define double @PR13969(double %x) { entry: %a = alloca i64 8, align 8 %b = alloca i64 8, align 8 %c = alloca i64 8, align 8 store double %x, ptr %a, align 8 store ptr %c, ptr %b, align 8 store ptr %a, ptr %b, align 8 store double %x, ptr %c, align 8 %ret = load double, ptr %a, align 8 ret double %ret } Transformation seems to be correct! (syntactically equal) -- 123. SROAPass ---------------------------------------- define double @PR13969(double %x) { entry: %a = alloca i64 8, align 8 %b = alloca i64 8, align 8 %c = alloca i64 8, align 8 store double %x, ptr %a, align 8 store ptr %c, ptr %b, align 8 store ptr %a, ptr %b, align 8 store double %x, ptr %c, align 8 %ret = load double, ptr %a, align 8 ret double %ret } => define double @PR13969(double %x) { entry: ret double %x } Transformation seems to be correct! -- 124. PassManager<Function> : Skipping NOP -- 125. PassManager<Function> : Skipping NOP -- 126. SROAPass ---------------------------------------- define void @PR14034(ptr %ptr, ptr %ptr2) { entry: %a = alloca i64 24, align 8 %list = gep ptr %a, 24 x i32 0, 1 x i64 8 %prev = gep ptr %list, 16 x i32 0, 1 x i64 8 store ptr %ptr, ptr %prev, align 8 memcpy ptr %ptr2 align 1, ptr %a align 1, i32 12 ret void } Transformation seems to be correct! (syntactically equal) -- 127. SROAPass ---------------------------------------- define void @PR14034(ptr %ptr, ptr %ptr2) { entry: %a = alloca i64 24, align 8 %list = gep ptr %a, 24 x i32 0, 1 x i64 8 %prev = gep ptr %list, 16 x i32 0, 1 x i64 8 store ptr %ptr, ptr %prev, align 8 memcpy ptr %ptr2 align 1, ptr %a align 8, i32 12 ret void } => define void @PR14034(ptr %ptr, ptr %ptr2) { entry: %a.sroa.0 = alloca i64 12, align 8 memcpy ptr %ptr2 align 1, ptr %a.sroa.0 align 8, i32 12 ret void } Transformation seems to be correct! -- 128. PassManager<Function> : Skipping NOP -- 129. PassManager<Function> : Skipping NOP -- 130. SROAPass ---------------------------------------- define i32 @test22(i32 %x) { entry: %a1 = alloca i64 4, align 8 %a2 = alloca i64 4, align 8 %a3 = alloca i64 8, align 8 %wrap1 = insertvalue [1 x {i32}] poison, i32 %x, 0, 0 store [1 x {i32}] %wrap1, ptr %a1, align 4 %load1 = load {[1 x {float}]}, ptr %a1, align 4 %unwrap1 = extractvalue {[1 x {float}]} %load1, 0, 0 %wrap2 = insertvalue {{}, {float}, (empty array)} poison, {float} %unwrap1, 1 store {{}, {float}, (empty array)} %wrap2, ptr %a2, align 4 %gep3 = gep ptr %a2, 4 x i32 0, 1 x i64 0, 1 x i64 0 %load3 = load <4 x i8>, ptr %gep3, align 4 %valcast1 = bitcast <4 x i8> %load3 to i32 %wrap3 = insertvalue [1 x [1 x i32]] poison, i32 %valcast1, 0, 0 %wrap4 = insertvalue {[1 x [1 x i32]], {}} poison, [1 x [1 x i32]] %wrap3, 0 %gep4 = gep ptr %a3, 8 x i32 0, 1 x i64 0 store {[1 x [1 x i32]], {}} %wrap4, ptr %gep4, align 4 %gep5 = gep ptr %a3, 8 x i32 0, 1 x i64 0, 1 x i64 0, 4 x i32 0 %load4 = load {{}, float, {}}, ptr %gep5, align 4 %unwrap2 = extractvalue {{}, float, {}} %load4, 1 %valcast2 = bitcast float %unwrap2 to i32 ret i32 %valcast2 } Transformation seems to be correct! (syntactically equal) -- 131. SROAPass ---------------------------------------- define i32 @test22(i32 %x) { entry: %a1 = alloca i64 4, align 8 %a2 = alloca i64 4, align 8 %a3 = alloca i64 8, align 8 %wrap1 = insertvalue [1 x {i32}] poison, i32 %x, 0, 0 store [1 x {i32}] %wrap1, ptr %a1, align 8 %load1 = load {[1 x {float}]}, ptr %a1, align 8 %unwrap1 = extractvalue {[1 x {float}]} %load1, 0, 0 %wrap2 = insertvalue {{}, {float}, (empty array)} poison, {float} %unwrap1, 1 store {{}, {float}, (empty array)} %wrap2, ptr %a2, align 8 %gep3 = gep ptr %a2, 4 x i32 0, 1 x i64 0, 1 x i64 0 %load3 = load <4 x i8>, ptr %gep3, align 8 %valcast1 = bitcast <4 x i8> %load3 to i32 %wrap3 = insertvalue [1 x [1 x i32]] poison, i32 %valcast1, 0, 0 %wrap4 = insertvalue {[1 x [1 x i32]], {}} poison, [1 x [1 x i32]] %wrap3, 0 %gep4 = gep ptr %a3, 8 x i32 0, 1 x i64 0 store {[1 x [1 x i32]], {}} %wrap4, ptr %gep4, align 8 %gep5 = gep ptr %a3, 8 x i32 0, 1 x i64 0, 1 x i64 0, 4 x i32 0 %load4 = load {{}, float, {}}, ptr %gep5, align 8 %unwrap2 = extractvalue {{}, float, {}} %load4, 1 %valcast2 = bitcast float %unwrap2 to i32 ret i32 %valcast2 } => define i32 @test22(i32 %x) { entry: %wrap1 = insertvalue [1 x {i32}] poison, i32 %x, 0, 0 %wrap1.fca.0.0.extract = extractvalue [1 x {i32}] %wrap1, 0, 0 %#0 = bitcast i32 %wrap1.fca.0.0.extract to float %load1.fca.0.0.0.insert = insertvalue {[1 x {float}]} poison, float %#0, 0, 0, 0 %unwrap1 = extractvalue {[1 x {float}]} %load1.fca.0.0.0.insert, 0, 0 %wrap2 = insertvalue {{}, {float}, (empty array)} poison, {float} %unwrap1, 1 %wrap2.fca.1.0.extract = extractvalue {{}, {float}, (empty array)} %wrap2, 1, 0 %#1 = bitcast float %wrap2.fca.1.0.extract to <4 x i8> %valcast1 = bitcast <4 x i8> %#1 to i32 %wrap3 = insertvalue [1 x [1 x i32]] poison, i32 %valcast1, 0, 0 %wrap4 = insertvalue {[1 x [1 x i32]], {}} poison, [1 x [1 x i32]] %wrap3, 0 %wrap4.fca.0.0.0.extract = extractvalue {[1 x [1 x i32]], {}} %wrap4, 0, 0, 0 %#2 = bitcast i32 %wrap4.fca.0.0.0.extract to <4 x i8> %#3 = bitcast <4 x i8> %#2 to float %load4.fca.1.insert = insertvalue {{}, float, {}} poison, float %#3, 1 %unwrap2 = extractvalue {{}, float, {}} %load4.fca.1.insert, 1 %valcast2 = bitcast float %unwrap2 to i32 ret i32 %valcast2 } Transformation seems to be correct! -- 132. PassManager<Function> : Skipping NOP -- 133. PassManager<Function> : Skipping NOP -- 134. SROAPass ---------------------------------------- define void @PR14059.1(ptr %d) { entry: %X.sroa.0.i = alloca i64 8, align 8, dead start_lifetime ptr %X.sroa.0.i store i32 0, ptr %X.sroa.0.i, align 8 %X.sroa.0.2.raw_idx2.i = gep inbounds ptr %X.sroa.0.i, 1 x i32 2 memset ptr %X.sroa.0.2.raw_idx2.i align 1, i8 0, i64 4 memset ptr %X.sroa.0.i align 1, i8 0, i64 8 %X.sroa.0.4.raw_idx4.i = gep inbounds ptr %X.sroa.0.i, 1 x i32 4 memcpy ptr %X.sroa.0.4.raw_idx4.i align 1, ptr %d align 1, i32 4 store i32 1072693248, ptr %X.sroa.0.4.raw_idx4.i, align 4 %X.sroa.0.0.load1.i = load double, ptr %X.sroa.0.i, align 8 %accum.real.i = load double, ptr %d, align 8 %add.r.i = fadd double %accum.real.i, %X.sroa.0.0.load1.i store double %add.r.i, ptr %d, align 8 end_lifetime ptr %X.sroa.0.i ret void } Transformation seems to be correct! (syntactically equal) -- 135. SROAPass ---------------------------------------- define void @PR14059.1(ptr %d) { entry: %X.sroa.0.i = alloca i64 8, align 8, dead start_lifetime ptr %X.sroa.0.i store i32 0, ptr %X.sroa.0.i, align 8 %X.sroa.0.2.raw_idx2.i = gep inbounds ptr %X.sroa.0.i, 1 x i32 2 memset ptr %X.sroa.0.2.raw_idx2.i align 2, i8 0, i64 4 memset ptr %X.sroa.0.i align 8, i8 0, i64 8 %X.sroa.0.4.raw_idx4.i = gep inbounds ptr %X.sroa.0.i, 1 x i32 4 memcpy ptr %X.sroa.0.4.raw_idx4.i align 4, ptr %d align 1, i32 4 store i32 1072693248, ptr %X.sroa.0.4.raw_idx4.i, align 4 %X.sroa.0.0.load1.i = load double, ptr %X.sroa.0.i, align 8 %accum.real.i = load double, ptr %d, align 8 %add.r.i = fadd double %accum.real.i, %X.sroa.0.0.load1.i store double %add.r.i, ptr %d, align 8 end_lifetime ptr %X.sroa.0.i ret void } => define void @PR14059.1(ptr %d) { entry: %X.sroa.0.i.4.copyload = load i32, ptr %d, align 1 %#5 = bitcast double 0.000000 to i64 %X.sroa.0.i.4.insert.ext = zext i32 %X.sroa.0.i.4.copyload to i64 %X.sroa.0.i.4.insert.shift = shl i64 %X.sroa.0.i.4.insert.ext, 32 %X.sroa.0.i.4.insert.mask3 = and i64 %#5, 4294967295 %X.sroa.0.i.4.insert.insert4 = or i64 %X.sroa.0.i.4.insert.mask3, %X.sroa.0.i.4.insert.shift %#6 = bitcast i64 %X.sroa.0.i.4.insert.insert4 to double %#7 = bitcast double %#6 to i64 %X.sroa.0.i.4.insert.mask = and i64 %#7, 4294967295 %X.sroa.0.i.4.insert.insert = or i64 %X.sroa.0.i.4.insert.mask, 4607182418800017408 %#8 = bitcast i64 %X.sroa.0.i.4.insert.insert to double %accum.real.i = load double, ptr %d, align 8 %add.r.i = fadd double %accum.real.i, %#8 store double %add.r.i, ptr %d, align 8 ret void } Transformation seems to be correct! -- 136. PassManager<Function> : Skipping NOP -- 137. PassManager<Function> : Skipping NOP -- 138. SROAPass ---------------------------------------- define i64 @PR14059.2(ptr %phi) { entry: %retval = alloca i64 8, align 4 store i64 0, ptr %retval, align 4 %phi.realp = gep inbounds ptr %phi, 8 x i32 0, 1 x i64 0 %phi.real = load float, ptr %phi.realp, align 4 %phi.imagp = gep inbounds ptr %phi, 8 x i32 0, 1 x i64 4 %phi.imag = load float, ptr %phi.imagp, align 4 %real = gep inbounds ptr %retval, 8 x i32 0, 1 x i64 0 %imag = gep inbounds ptr %retval, 8 x i32 0, 1 x i64 4 store float %phi.real, ptr %real, align 4 store float %phi.imag, ptr %imag, align 4 %#0 = load i64, ptr %retval, align 1 ret i64 %#0 } Transformation seems to be correct! (syntactically equal) -- 139. SROAPass ---------------------------------------- define i64 @PR14059.2(ptr %phi) { entry: %retval = alloca i64 8, align 4 store i64 0, ptr %retval, align 4 %phi.realp = gep inbounds ptr %phi, 8 x i32 0, 1 x i64 0 %phi.real = load float, ptr %phi.realp, align 4 %phi.imagp = gep inbounds ptr %phi, 8 x i32 0, 1 x i64 4 %phi.imag = load float, ptr %phi.imagp, align 4 %real = gep inbounds ptr %retval, 8 x i32 0, 1 x i64 0 %imag = gep inbounds ptr %retval, 8 x i32 0, 1 x i64 4 store float %phi.real, ptr %real, align 4 store float %phi.imag, ptr %imag, align 4 %#0 = load i64, ptr %retval, align 4 ret i64 %#0 } => define i64 @PR14059.2(ptr %phi) { entry: %phi.realp = gep inbounds ptr %phi, 8 x i32 0, 1 x i64 0 %phi.real = load float, ptr %phi.realp, align 4 %phi.imagp = gep inbounds ptr %phi, 8 x i32 0, 1 x i64 4 %phi.imag = load float, ptr %phi.imagp, align 4 %#0 = bitcast float %phi.real to i32 %#1 = bitcast float %phi.imag to i32 %retval.sroa.3.0.insert.ext = zext i32 %#1 to i64 %retval.sroa.3.0.insert.shift = shl i64 %retval.sroa.3.0.insert.ext, 32 %retval.sroa.3.0.insert.mask = and i64 undef, 4294967295 %retval.sroa.3.0.insert.insert = or i64 %retval.sroa.3.0.insert.mask, %retval.sroa.3.0.insert.shift %retval.sroa.0.0.insert.ext = zext i32 %#0 to i64 %retval.sroa.0.0.insert.mask = and i64 %retval.sroa.3.0.insert.insert, -4294967296 %retval.sroa.0.0.insert.insert = or i64 %retval.sroa.0.0.insert.mask, %retval.sroa.0.0.insert.ext ret i64 %retval.sroa.0.0.insert.insert } Transformation seems to be correct! -- 140. PassManager<Function> : Skipping NOP -- 141. PassManager<Function> : Skipping NOP -- 142. SROAPass ---------------------------------------- define void @PR14105(ptr %ptr) { entry: %a = alloca i64 16, align 8 %gep = gep inbounds ptr %ptr, 16 x i64 -1 memcpy ptr %gep align 8, ptr %a align 8, i32 16 ret void } Transformation seems to be correct! (syntactically equal) -- 143. SROAPass ---------------------------------------- define void @PR14105(ptr %ptr) { entry: %a = alloca i64 16, align 8 %gep = gep inbounds ptr %ptr, 16 x i64 -1 memcpy ptr %gep align 8, ptr %a align 8, i32 16 ret void } => define void @PR14105(ptr %ptr) { entry: %a.sroa.0 = alloca i64 16, align 8 %gep = gep inbounds ptr %ptr, 16 x i64 -1 memcpy ptr %gep align 8, ptr %a.sroa.0 align 8, i32 16 ret void } Transformation seems to be correct! -- 144. PassManager<Function> : Skipping NOP -- 145. PassManager<Function> : Skipping NOP -- 146. SROAPass -- 147. SROAPass -- 148. PassManager<Function> : Skipping NOP -- 149. PassManager<Function> : Skipping NOP -- 150. SROAPass ---------------------------------------- define void @PR14465() { #0: %stack = alloca i64 4194304, align 16 memset ptr %stack align 16, i8 254, i64 4194304 ret void } Transformation seems to be correct! (syntactically equal) -- 151. SROAPass ---------------------------------------- define void @PR14465() { #0: %stack = alloca i64 4194304, align 16 memset ptr %stack align 16, i8 254, i64 4194304 ret void } Transformation seems to be correct! (syntactically equal) -- 152. PassManager<Function> : Skipping NOP -- 153. PassManager<Function> : Skipping NOP -- 154. SROAPass ---------------------------------------- define void @PR14548(i1 %x) { entry: %a = alloca i64 1, align 8 %b = alloca i64 1, align 8 store i1 %x, ptr %b, align 8 %foo = load i8, ptr %b, align 1 memcpy ptr %a align 1, ptr %b align 1, i32 1 %bar = load i8, ptr %a, align 1 %baz = load i1, ptr %a, align 1 ret void } Transformation seems to be correct! (syntactically equal) -- 155. SROAPass ---------------------------------------- define void @PR14548(i1 %x) { entry: %a = alloca i64 1, align 8 %b = alloca i64 1, align 8 store i1 %x, ptr %b, align 8 %foo = load i8, ptr %b, align 8 memcpy ptr %a align 8, ptr %b align 8, i32 1 %bar = load i8, ptr %a, align 8 %baz = load i1, ptr %a, align 8 ret void } => define void @PR14548(i1 %x) { entry: %a.sroa.0 = alloca i64 1, align 8 %b.sroa.0 = alloca i64 1, align 8 store i1 %x, ptr %b.sroa.0, align 8 %b.sroa.0.0.b.sroa.0.0.foo = load i8, ptr %b.sroa.0, align 8 %b.sroa.0.0.b.sroa.0.0.copyload = load i8, ptr %b.sroa.0, align 8 store i8 %b.sroa.0.0.b.sroa.0.0.copyload, ptr %a.sroa.0, align 8 %a.sroa.0.0.a.sroa.0.0.bar = load i8, ptr %a.sroa.0, align 8 %a.sroa.0.0.a.sroa.0.0.baz = load i1, ptr %a.sroa.0, align 8 ret void } Transformation seems to be correct! -- 156. PassManager<Function> : Skipping NOP -- 157. PassManager<Function> : Skipping NOP -- 158. SROAPass ---------------------------------------- define <3 x i8> @PR14572.1(i32 %x) { entry: %a = alloca i64 4, align 4 store i32 %x, ptr %a, align 1 %y = load <3 x i8>, ptr %a, align 4 ret <3 x i8> %y } Transformation seems to be correct! (syntactically equal) -- 159. SROAPass ---------------------------------------- define <3 x i8> @PR14572.1(i32 %x) { entry: %a = alloca i64 4, align 4 store i32 %x, ptr %a, align 4 %y = load <3 x i8>, ptr %a, align 4 ret <3 x i8> %y } => define <3 x i8> @PR14572.1(i32 %x) { entry: %a.0.extract.trunc = trunc i32 %x to i24 %#0 = bitcast i24 %a.0.extract.trunc to <3 x i8> ret <3 x i8> %#0 } Transformation seems to be correct! -- 160. PassManager<Function> : Skipping NOP -- 161. PassManager<Function> : Skipping NOP -- 162. SROAPass ---------------------------------------- define i32 @PR14572.2(<3 x i8> %x) { entry: %a = alloca i64 4, align 4 store <3 x i8> %x, ptr %a, align 1 %y = load i32, ptr %a, align 4 ret i32 %y } Transformation seems to be correct! (syntactically equal) -- 163. SROAPass ---------------------------------------- define i32 @PR14572.2(<3 x i8> %x) { entry: %a = alloca i64 4, align 4 store <3 x i8> %x, ptr %a, align 4 %y = load i32, ptr %a, align 4 ret i32 %y } => define i32 @PR14572.2(<3 x i8> %x) { entry: %#0 = bitcast <3 x i8> %x to i24 %a.sroa.2.0.insert.ext = zext i8 undef to i32 %a.sroa.2.0.insert.shift = shl i32 %a.sroa.2.0.insert.ext, 24 %a.sroa.2.0.insert.mask = and i32 undef, 16777215 %a.sroa.2.0.insert.insert = or i32 %a.sroa.2.0.insert.mask, %a.sroa.2.0.insert.shift %a.0.insert.ext = zext i24 %#0 to i32 %a.0.insert.mask = and i32 %a.sroa.2.0.insert.insert, 4278190080 %a.0.insert.insert = or i32 %a.0.insert.mask, %a.0.insert.ext ret i32 %a.0.insert.insert } Transformation seems to be correct! -- 164. PassManager<Function> : Skipping NOP -- 165. PassManager<Function> : Skipping NOP -- 166. SROAPass ---------------------------------------- define i32 @PR14601(i32 %x) { entry: %a = alloca i64 4, align 4 memset ptr %a align 1, i8 0, i32 %x %v = load i32, ptr %a, align 4 ret i32 %v } Transformation seems to be correct! (syntactically equal) -- 167. SROAPass ---------------------------------------- define i32 @PR14601(i32 %x) { entry: %a = alloca i64 4, align 4 memset ptr %a align 4, i8 0, i32 %x %v = load i32, ptr %a, align 4 ret i32 %v } => define i32 @PR14601(i32 %x) { entry: %a = alloca i64 4, align 4 memset ptr %a align 4, i8 0, i32 %x %a.0.v = load i32, ptr %a, align 4 ret i32 %a.0.v } Transformation seems to be correct! -- 168. PassManager<Function> : Skipping NOP -- 169. PassManager<Function> : Skipping NOP -- 170. SROAPass ---------------------------------------- define void @PR15674(ptr %data, ptr %src, i32 %size) { entry: %tmp = alloca i64 4, align 1 switch i32 %size, label %end [ i32 4, label %bb4 i32 3, label %bb3 i32 2, label %bb2 i32 1, label %bb1 ] bb4: %src.gep3 = gep inbounds ptr %src, 1 x i32 3 %src.3 = load i8, ptr %src.gep3, align 1 %tmp.gep3 = gep inbounds ptr %tmp, 4 x i32 0, 1 x i32 3 store i8 %src.3, ptr %tmp.gep3, align 1 br label %bb3 bb3: %src.gep2 = gep inbounds ptr %src, 1 x i32 2 %src.2 = load i8, ptr %src.gep2, align 1 %tmp.gep2 = gep inbounds ptr %tmp, 4 x i32 0, 1 x i32 2 store i8 %src.2, ptr %tmp.gep2, align 1 br label %bb2 bb2: %src.gep1 = gep inbounds ptr %src, 1 x i32 1 %src.1 = load i8, ptr %src.gep1, align 1 %tmp.gep1 = gep inbounds ptr %tmp, 4 x i32 0, 1 x i32 1 store i8 %src.1, ptr %tmp.gep1, align 1 br label %bb1 bb1: %src.0 = load i8, ptr %src, align 1 store i8 %src.0, ptr %tmp, align 1 br label %end end: memcpy ptr %data align 1, ptr %tmp align 1, i32 %size ret void } Transformation seems to be correct! (syntactically equal) -- 171. SROAPass ---------------------------------------- define void @PR15674(ptr %data, ptr %src, i32 %size) { entry: %tmp = alloca i64 4, align 1 switch i32 %size, label %end [ i32 4, label %bb4 i32 3, label %bb3 i32 2, label %bb2 i32 1, label %bb1 ] bb4: %src.gep3 = gep inbounds ptr %src, 1 x i32 3 %src.3 = load i8, ptr %src.gep3, align 1 %tmp.gep3 = gep inbounds ptr %tmp, 4 x i32 0, 1 x i32 3 store i8 %src.3, ptr %tmp.gep3, align 1 br label %bb3 bb3: %src.gep2 = gep inbounds ptr %src, 1 x i32 2 %src.2 = load i8, ptr %src.gep2, align 1 %tmp.gep2 = gep inbounds ptr %tmp, 4 x i32 0, 1 x i32 2 store i8 %src.2, ptr %tmp.gep2, align 1 br label %bb2 bb2: %src.gep1 = gep inbounds ptr %src, 1 x i32 1 %src.1 = load i8, ptr %src.gep1, align 1 %tmp.gep1 = gep inbounds ptr %tmp, 4 x i32 0, 1 x i32 1 store i8 %src.1, ptr %tmp.gep1, align 1 br label %bb1 bb1: %src.0 = load i8, ptr %src, align 1 store i8 %src.0, ptr %tmp, align 1 br label %end end: memcpy ptr %data align 1, ptr %tmp align 1, i32 %size ret void } => define void @PR15674(ptr %data, ptr %src, i32 %size) { entry: %tmp.sroa.0 = alloca i64 4, align 4 switch i32 %size, label %end [ i32 4, label %bb4 i32 3, label %bb3 i32 2, label %bb2 i32 1, label %bb1 ] bb4: %src.gep3 = gep inbounds ptr %src, 1 x i32 3 %src.3 = load i8, ptr %src.gep3, align 1 %tmp.sroa.0.3.tmp.gep3.sroa_idx3 = gep inbounds ptr %tmp.sroa.0, 1 x i64 3 store i8 %src.3, ptr %tmp.sroa.0.3.tmp.gep3.sroa_idx3, align 1 br label %bb3 bb3: %src.gep2 = gep inbounds ptr %src, 1 x i32 2 %src.2 = load i8, ptr %src.gep2, align 1 %tmp.sroa.0.2.tmp.gep2.sroa_idx2 = gep inbounds ptr %tmp.sroa.0, 1 x i64 2 store i8 %src.2, ptr %tmp.sroa.0.2.tmp.gep2.sroa_idx2, align 2 br label %bb2 bb2: %src.gep1 = gep inbounds ptr %src, 1 x i32 1 %src.1 = load i8, ptr %src.gep1, align 1 %tmp.sroa.0.1.tmp.gep1.sroa_idx1 = gep inbounds ptr %tmp.sroa.0, 1 x i64 1 store i8 %src.1, ptr %tmp.sroa.0.1.tmp.gep1.sroa_idx1, align 1 br label %bb1 bb1: %src.0 = load i8, ptr %src, align 1 store i8 %src.0, ptr %tmp.sroa.0, align 4 br label %end end: memcpy ptr %data align 1, ptr %tmp.sroa.0 align 4, i32 %size ret void } Transformation doesn't verify! (not unsound) ERROR: Timeout -- 172. PassManager<Function> : Skipping NOP -- 173. PassManager<Function> : Skipping NOP -- 174. SROAPass ---------------------------------------- define void @PR15805(i1 %a, i1 %b) { #0: %c = alloca i64 8, align 8 %p.0.c = select i1 %a, ptr %c, ptr %c %cond.in = select i1 %b, ptr %p.0.c, ptr %c %cond = load i64, ptr %cond.in, align 8 ret void } Transformation seems to be correct! (syntactically equal) -- 175. SROAPass ---------------------------------------- define void @PR15805(i1 %a, i1 %b) { #0: %c = alloca i64 8, align 8 %p.0.c = select i1 %a, ptr %c, ptr %c %cond.in = select i1 %b, ptr %p.0.c, ptr %c %cond = load i64, ptr %cond.in, align 8 ret void } => define void @PR15805(i1 %a, i1 %b) { #0: br i1 %b, label %.cont, label %.else .else: br label %.cont .cont: ret void } Transformation doesn't verify! (unsound) ERROR: Source is more defined than target Example: i1 %a = #x0 (0) [based on undef value] i1 %b = undef Source: ptr %c = pointer(local, block_id=0, offset=0) ptr %p.0.c = pointer(local, block_id=0, offset=0) ptr %cond.in = pointer(local, block_id=0, offset=0) i64 %cond = poison SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 1 alive: true LOCAL BLOCKS: Block 2 > size: 8 align: 8 alloc type: 1 alive: true Target: UB triggered on br Pass: SROAPass 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=sroa<modify-cfg>' '-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_5k5zNHKB_21hi.bc" ------------------- SMT STATS ------------------- Num queries: 78 Num invalid: 0 Num skips: 0 Num trivial: 152 (66.1%) Num timeout: 1 (1.3%) Num errors: 0 (0.0%) Num SAT: 53 (67.9%) Num UNSAT: 24 (30.8%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll -passes='sroa<preserve-cfg>' -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG + /home/nlopes/alive2/build/opt-alive.sh '-passes=sroa<preserve-cfg>' -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG RUN: at line 3: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll -passes='sroa<modify-cfg>' -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll --check-prefixes=CHECK,CHECK-MODIFY-CFG + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll --check-prefixes=CHECK,CHECK-MODIFY-CFG + /home/nlopes/alive2/build/opt-alive.sh '-passes=sroa<modify-cfg>' -S FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SROA/basictest.ll --check-prefixes=CHECK,CHECK-MODIFY-CFG
NOTE: This test would pass if undef didn't exist!