Test Failure: Transforms/InstCombine/load.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
ERROR: Unsupported attribute: swifterror
ERROR: Unsupported attribute: swifterror
ERROR: Unsupported type: <vscale x 4 x i8>
ERROR: Unsupported instruction:   %x.load = load <vscale x 4 x i8>, ptr %x, align 1
ERROR: Unsupported instruction:   %Y = load ptr addrspace(1), ptr %P, align 8
ERROR: Unsupported instruction:   %Y = load <2 x ptr addrspace(1)>, ptr %P, align 16
-- 1. PassManager<Function> : Skipping NOP
-- 2. InstCombinePass

----------------------------------------
@X = constant 4 bytes, align 4

define i32 @test1() {
init:
  store i32 42, ptr @X, align 4
  br label %#0

#0:
  %B = load i32, ptr @X, align 4
  ret i32 %B
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
@X = constant 4 bytes, align 4

define i32 @test1() {
init:
  store i32 42, ptr @X, align 4
  br label %#0

#0:
  %B = load i32, ptr @X, align 4
  ret i32 %B
}
=>
@X = constant 4 bytes, align 4

define i32 @test1() {
init:
  store i32 42, ptr @X, align 4
  br label %#0

#0:
  ret i32 42
}
Transformation seems to be correct!

-- 4. PassManager<Function> : Skipping NOP
-- 5. PassManager<Function> : Skipping NOP
-- 6. InstCombinePass

----------------------------------------
@Y = constant 16 bytes, align 8

define float @test2() {
init:
  %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } }
  store [2 x {i32, float}] %__copy_0, ptr @Y, align 8
  br label %#0

#0:
  %A = gep ptr @Y, 16 x i64 0, 8 x i64 1, 1 x i64 4
  %B = load float, ptr %A, align 4
  ret float %B
}
Transformation seems to be correct! (syntactically equal)

-- 7. InstCombinePass

----------------------------------------
@Y = constant 16 bytes, align 8

define float @test2() {
init:
  %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } }
  store [2 x {i32, float}] %__copy_0, ptr @Y, align 8
  br label %#0

#0:
  %A = gep ptr @Y, 16 x i64 0, 8 x i64 1, 1 x i64 4
  %B = load float, ptr %A, align 4
  ret float %B
}
=>
@Y = constant 16 bytes, align 8

define float @test2() {
init:
  %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } }
  store [2 x {i32, float}] %__copy_0, ptr @Y, align 8
  br label %#0

#0:
  ret float 1.231200
}
Transformation seems to be correct!

-- 8. PassManager<Function> : Skipping NOP
-- 9. PassManager<Function> : Skipping NOP
-- 10. InstCombinePass

----------------------------------------
@Y = constant 16 bytes, align 8

define i32 @test3() {
init:
  %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } }
  store [2 x {i32, float}] %__copy_0, ptr @Y, align 8
  br label %#0

#0:
  %A = gep ptr @Y, 16 x i64 0, 8 x i64 0, 1 x i64 0
  %B = load i32, ptr %A, align 4
  ret i32 %B
}
Transformation seems to be correct! (syntactically equal)

-- 11. InstCombinePass

----------------------------------------
@Y = constant 16 bytes, align 8

define i32 @test3() {
init:
  %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } }
  store [2 x {i32, float}] %__copy_0, ptr @Y, align 8
  br label %#0

#0:
  %A = gep ptr @Y, 16 x i64 0, 8 x i64 0, 1 x i64 0
  %B = load i32, ptr %A, align 8
  ret i32 %B
}
=>
@Y = constant 16 bytes, align 8

define i32 @test3() {
init:
  %__copy_0 = [2 x {i32, float}] { { 12, 1.000000 }, { 37, 1.231200 } }
  store [2 x {i32, float}] %__copy_0, ptr @Y, align 8
  br label %#0

#0:
  ret i32 12
}
Transformation seems to be correct!

-- 12. PassManager<Function> : Skipping NOP
-- 13. PassManager<Function> : Skipping NOP
-- 14. InstCombinePass

----------------------------------------
@Z = constant 16 bytes, align 8

define i32 @test4() {
init:
  store [2 x {i32, float}] { { 0, 0.000000 }, { 0, 0.000000 } }, ptr @Z, align 8
  br label %#0

#0:
  %A = gep ptr @Z, 16 x i64 0, 8 x i64 1, 1 x i64 0
  %B = load i32, ptr %A, align 4
  ret i32 %B
}
Transformation seems to be correct! (syntactically equal)

-- 15. InstCombinePass

----------------------------------------
@Z = constant 16 bytes, align 8

define i32 @test4() {
init:
  store [2 x {i32, float}] { { 0, 0.000000 }, { 0, 0.000000 } }, ptr @Z, align 8
  br label %#0

#0:
  %A = gep ptr @Z, 16 x i64 0, 8 x i64 1, 1 x i64 0
  %B = load i32, ptr %A, align 8
  ret i32 %B
}
=>
@Z = constant 16 bytes, align 8

define i32 @test4() {
init:
  store [2 x {i32, float}] { { 0, 0.000000 }, { 0, 0.000000 } }, ptr @Z, align 8
  br label %#0

#0:
  ret i32 0
}
Transformation seems to be correct!

-- 16. PassManager<Function> : Skipping NOP
-- 17. PassManager<Function> : Skipping NOP
-- 18. InstCombinePass

----------------------------------------
@X = constant 4 bytes, align 4
@X2 = constant 4 bytes, align 4

define i32 @test5(i1 %C) {
init:
  store i32 42, ptr @X, align 4
  store i32 47, ptr @X2, align 4
  br label %#0

#0:
  %Y = select i1 %C, ptr @X, ptr @X2
  %Z = load i32, ptr %Y, align 4
  ret i32 %Z
}
Transformation seems to be correct! (syntactically equal)

-- 19. InstCombinePass

----------------------------------------
@X = constant 4 bytes, align 4
@X2 = constant 4 bytes, align 4

define i32 @test5(i1 %C) {
init:
  store i32 42, ptr @X, align 4
  store i32 47, ptr @X2, align 4
  br label %#0

#0:
  %Y = select i1 %C, ptr @X, ptr @X2
  %Z = load i32, ptr %Y, align 4
  ret i32 %Z
}
=>
@X = constant 4 bytes, align 4
@X2 = constant 4 bytes, align 4

define i32 @test5(i1 %C) {
init:
  store i32 42, ptr @X, align 4
  store i32 47, ptr @X2, align 4
  br label %#0

#0:
  %Z = select i1 %C, i32 42, i32 47
  ret i32 %Z
}
Transformation seems to be correct!

-- 20. PassManager<Function> : Skipping NOP
-- 21. PassManager<Function> : Skipping NOP
-- 22. InstCombinePass

----------------------------------------
@X = constant 4 bytes, align 4
@X2 = constant 4 bytes, align 4

define i32 @test5_asan(i1 %C) {
init:
  store i32 42, ptr @X, align 4
  store i32 47, ptr @X2, align 4
  br label %#0

#0:
  %Y = select i1 %C, ptr @X, ptr @X2
  %Z = load i32, ptr %Y, align 4
  ret i32 %Z
}
Transformation seems to be correct! (syntactically equal)

-- 23. InstCombinePass

----------------------------------------
@X = constant 4 bytes, align 4
@X2 = constant 4 bytes, align 4

define i32 @test5_asan(i1 %C) {
init:
  store i32 42, ptr @X, align 4
  store i32 47, ptr @X2, align 4
  br label %#0

#0:
  %Y = select i1 %C, ptr @X, ptr @X2
  %Z = load i32, ptr %Y, align 4
  ret i32 %Z
}
Transformation seems to be correct! (syntactically equal)

-- 24. PassManager<Function> : Skipping NOP
-- 25. PassManager<Function> : Skipping NOP
-- 26. InstCombinePass

----------------------------------------
define i32 @load_gep_null_inbounds(i64 %X) {
#0:
  %V = gep inbounds ptr null, 4 x i64 %X
  %R = load i32, ptr %V, align 4
  ret i32 %R
}
Transformation seems to be correct! (syntactically equal)

-- 27. InstCombinePass

----------------------------------------
define i32 @load_gep_null_inbounds(i64 %X) {
#0:
  %V = gep inbounds ptr null, 4 x i64 %X
  %R = load i32, ptr %V, align 4
  ret i32 %R
}
=>
define i32 @load_gep_null_inbounds(i64 %X) {
#0:
  store i1 1, ptr poison, align 1
  ret i32 poison
}

****************************************
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!

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

----------------------------------------
define i32 @load_gep_null_not_inbounds(i64 %X) {
#0:
  %V = gep ptr null, 4 x i64 %X
  %R = load i32, ptr %V, align 4
  ret i32 %R
}
Transformation seems to be correct! (syntactically equal)

-- 31. InstCombinePass

----------------------------------------
define i32 @load_gep_null_not_inbounds(i64 %X) {
#0:
  %V = gep ptr null, 4 x i64 %X
  %R = load i32, ptr %V, align 4
  ret i32 %R
}
=>
define i32 @load_gep_null_not_inbounds(i64 %X) {
#0:
  store i1 1, ptr poison, align 1
  ret i32 poison
}

****************************************
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!

-- 32. PassManager<Function> : Skipping NOP
-- 33. PassManager<Function> : Skipping NOP
-- 34. InstCombinePass

----------------------------------------
define i32 @test7_no_null_opt(i32 %X) null_pointer_is_valid {
#0:
  %V = gep ptr null, 4 x i32 %X
  %R = load i32, ptr %V, align 4
  ret i32 %R
}
Transformation seems to be correct! (syntactically equal)

-- 35. InstCombinePass

----------------------------------------
define i32 @test7_no_null_opt(i32 %X) null_pointer_is_valid {
#0:
  %V = gep ptr null, 4 x i32 %X
  %R = load i32, ptr %V, align 4
  ret i32 %R
}
=>
define i32 @test7_no_null_opt(i32 %X) null_pointer_is_valid {
#0:
  %#1 = sext i32 %X to i64
  %V = gep ptr null, 4 x i64 %#1
  %R = load i32, ptr %V, align 4
  ret i32 %R
}
Transformation seems to be correct!

-- 36. PassManager<Function> : Skipping NOP
-- 37. PassManager<Function> : Skipping NOP
-- 38. InstCombinePass

----------------------------------------
define i32 @test8(ptr %P) {
#0:
  store i32 1, ptr %P, align 4
  %X = load i32, ptr %P, align 4
  ret i32 %X
}
Transformation seems to be correct! (syntactically equal)

-- 39. InstCombinePass

----------------------------------------
define i32 @test8(ptr %P) {
#0:
  store i32 1, ptr %P, align 4
  %X = load i32, ptr %P, align 4
  ret i32 %X
}
=>
define i32 @test8(ptr %P) {
#0:
  store i32 1, ptr %P, align 4
  ret i32 1
}
Transformation seems to be correct!

-- 40. PassManager<Function> : Skipping NOP
-- 41. PassManager<Function> : Skipping NOP
-- 42. InstCombinePass

----------------------------------------
define i32 @test9(ptr %P) {
#0:
  %X = load i32, ptr %P, align 4
  %Y = load i32, ptr %P, align 4
  %Z = sub i32 %X, %Y
  ret i32 %Z
}
Transformation seems to be correct! (syntactically equal)

-- 43. InstCombinePass

----------------------------------------
define i32 @test9(ptr %P) {
#0:
  %X = load i32, ptr %P, align 4
  %Y = load i32, ptr %P, align 4
  %Z = sub i32 %X, %Y
  ret i32 %Z
}
=>
define i32 @test9(ptr %P) {
#0:
  ret i32 0
}
Transformation seems to be correct!

-- 44. PassManager<Function> : Skipping NOP
-- 45. PassManager<Function> : Skipping NOP
-- 46. InstCombinePass

----------------------------------------
define i32 @test10(i1 %C.upgrd.1, ptr %P, ptr %Q) {
#0:
  br i1 %C.upgrd.1, label %T, label %F

F:
  store i32 0, ptr %P, align 4
  br label %C

T:
  store i32 1, ptr %Q, align 4
  store i32 0, ptr %P, align 4
  br label %C

C:
  %V = load i32, ptr %P, align 4
  ret i32 %V
}
Transformation seems to be correct! (syntactically equal)

-- 47. InstCombinePass

----------------------------------------
define i32 @test10(i1 %C.upgrd.1, ptr %P, ptr %Q) {
#0:
  br i1 %C.upgrd.1, label %T, label %F

F:
  store i32 0, ptr %P, align 4
  br label %C

T:
  store i32 1, ptr %Q, align 4
  store i32 0, ptr %P, align 4
  br label %C

C:
  %V = load i32, ptr %P, align 4
  ret i32 %V
}
=>
define i32 @test10(i1 %C.upgrd.1, ptr %P, ptr %Q) {
#0:
  br i1 %C.upgrd.1, label %T, label %F

F:
  br label %C

T:
  store i32 1, ptr %Q, align 4
  br label %C

C:
  store i32 0, ptr %P, align 4
  ret i32 0
}
Transformation seems to be correct!

-- 48. PassManager<Function> : Skipping NOP
-- 49. PassManager<Function> : Skipping NOP
-- 50. InstCombinePass

----------------------------------------
define double @test11(ptr %p) {
#0:
  %t0 = gep ptr %p, 8 x i32 1
  store double 2.000000, ptr %t0, align 8
  %t1 = gep ptr %p, 8 x i32 1
  %x = load double, ptr %t1, align 8
  ret double %x
}
Transformation seems to be correct! (syntactically equal)

-- 51. InstCombinePass

----------------------------------------
define double @test11(ptr %p) {
#0:
  %t0 = gep ptr %p, 8 x i32 1
  store double 2.000000, ptr %t0, align 8
  %t1 = gep ptr %p, 8 x i32 1
  %x = load double, ptr %t1, align 8
  ret double %x
}
=>
define double @test11(ptr %p) {
#0:
  %t0 = gep ptr %p, 1 x i64 8
  store double 2.000000, ptr %t0, align 8
  ret double 2.000000
}
Transformation seems to be correct!

-- 52. PassManager<Function> : Skipping NOP
-- 53. PassManager<Function> : Skipping NOP
-- 54. InstCombinePass

----------------------------------------
define i32 @test12(ptr %P) {
#0:
  %A = alloca i64 4, align 4
  store i32 123, ptr %A, align 4
  %V = load i32, ptr %A, align 4
  ret i32 %V
}
Transformation seems to be correct! (syntactically equal)

-- 55. InstCombinePass

----------------------------------------
define i32 @test12(ptr %P) {
#0:
  %A = alloca i64 4, align 4
  store i32 123, ptr %A, align 4
  %V = load i32, ptr %A, align 4
  ret i32 %V
}
=>
define i32 @test12(ptr %P) {
#0:
  ret i32 123
}
Transformation seems to be correct!

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

----------------------------------------
@GLOBAL = constant 16 bytes, align 4

define <16 x i8> @test13(<2 x i64> %x) {
init:
  store [4 x i32] { 0, 0, 0, 0 }, ptr @GLOBAL, align 4
  br label %#0

#0:
  %tmp = load <16 x i8>, ptr @GLOBAL, align 16
  ret <16 x i8> %tmp
}
Transformation seems to be correct! (syntactically equal)

-- 59. InstCombinePass

----------------------------------------
@GLOBAL = constant 16 bytes, align 4

define <16 x i8> @test13(<2 x i64> %x) {
init:
  store [4 x i32] { 0, 0, 0, 0 }, ptr @GLOBAL, align 4
  br label %#0

#0:
  %tmp = load <16 x i8>, ptr @GLOBAL, align 16
  ret <16 x i8> %tmp
}
=>
@GLOBAL = constant 16 bytes, align 4

define <16 x i8> @test13(<2 x i64> %x) {
init:
  store [4 x i32] { 0, 0, 0, 0 }, ptr @GLOBAL, align 4
  br label %#0

#0:
  ret <16 x i8> { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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!

-- 60. PassManager<Function> : Skipping NOP
-- 61. PassManager<Function> : Skipping NOP
-- 62. InstCombinePass

----------------------------------------
define i8 @test14(i8 %x, i32 %y) {
#0:
  %a = alloca i64 4, align 4
  store i8 %x, ptr %a, align 1
  store i32 %y, ptr %a, align 4
  %r = load i8, ptr %a, align 1
  ret i8 %r
}
Transformation seems to be correct! (syntactically equal)

-- 63. InstCombinePass

----------------------------------------
define i8 @test14(i8 %x, i32 %y) {
#0:
  %a = alloca i64 4, align 4
  store i8 %x, ptr %a, align 1
  store i32 %y, ptr %a, align 4
  %r = load i8, ptr %a, align 1
  ret i8 %r
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
@test15_global = global 4 bytes, align 4

define i8 @test15(i8 %x, i32 %y) {
#0:
  store i8 %x, ptr @test15_global, align 1
  store i32 %y, ptr @test15_global, align 4
  %r = load i8, ptr @test15_global, align 1
  ret i8 %r
}
Transformation seems to be correct! (syntactically equal)

-- 67. InstCombinePass

----------------------------------------
@test15_global = global 4 bytes, align 4

define i8 @test15(i8 %x, i32 %y) {
#0:
  store i8 %x, ptr @test15_global, align 1
  store i32 %y, ptr @test15_global, align 4
  %r = load i8, ptr @test15_global, align 1
  ret i8 %r
}
Transformation seems to be correct! (syntactically equal)

-- 68. PassManager<Function> : Skipping NOP
-- 69. PassManager<Function> : Skipping NOP
-- 70. InstCombinePass

----------------------------------------
define void @test16(ptr %x, ptr %a, ptr %b, ptr %c) {
entry:
  %x1 = load float, ptr %x, align 4
  store float %x1, ptr %a, align 4
  store float %x1, ptr %b, align 4
  %x2 = load float, ptr %x, align 4
  store float %x2, ptr %b, align 4
  %x2.cast = bitcast float %x2 to i32
  store i32 %x2.cast, ptr %c, align 4
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 71. InstCombinePass

----------------------------------------
define void @test16(ptr %x, ptr %a, ptr %b, ptr %c) {
entry:
  %x1 = load float, ptr %x, align 4
  store float %x1, ptr %a, align 4
  store float %x1, ptr %b, align 4
  %x2 = load float, ptr %x, align 4
  store float %x2, ptr %b, align 4
  %x2.cast = bitcast float %x2 to i32
  store i32 %x2.cast, ptr %c, align 4
  ret void
}
=>
define void @test16(ptr %x, ptr %a, ptr %b, ptr %c) {
entry:
  %x1 = load float, ptr %x, align 4
  store float %x1, ptr %a, align 4
  store float %x1, ptr %b, align 4
  %x2 = load float, ptr %x, align 4
  store float %x2, ptr %b, align 4
  store float %x2, ptr %c, align 4
  ret void
}
Transformation seems to be correct!

-- 72. PassManager<Function> : Skipping NOP
-- 73. PassManager<Function> : Skipping NOP
-- 74. InstCombinePass

----------------------------------------
define void @test16-vect(ptr %x, ptr %a, ptr %b, ptr %c) {
entry:
  %x1 = load <4 x i8>, ptr %x, align 4
  store <4 x i8> %x1, ptr %a, align 4
  store <4 x i8> %x1, ptr %b, align 4
  %x2 = load <4 x i8>, ptr %x, align 4
  store <4 x i8> %x2, ptr %b, align 4
  %x2.cast = bitcast <4 x i8> %x2 to i32
  store i32 %x2.cast, ptr %c, align 4
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 75. InstCombinePass

----------------------------------------
define void @test16-vect(ptr %x, ptr %a, ptr %b, ptr %c) {
entry:
  %x1 = load <4 x i8>, ptr %x, align 4
  store <4 x i8> %x1, ptr %a, align 4
  store <4 x i8> %x1, ptr %b, align 4
  %x2 = load <4 x i8>, ptr %x, align 4
  store <4 x i8> %x2, ptr %b, align 4
  %x2.cast = bitcast <4 x i8> %x2 to i32
  store i32 %x2.cast, ptr %c, align 4
  ret void
}
=>
define void @test16-vect(ptr %x, ptr %a, ptr %b, ptr %c) {
entry:
  %x1 = load <4 x i8>, ptr %x, align 4
  store <4 x i8> %x1, ptr %a, align 4
  store <4 x i8> %x1, ptr %b, align 4
  %x2 = load <4 x i8>, ptr %x, align 4
  store <4 x i8> %x2, ptr %b, align 4
  store <4 x i8> %x2, ptr %c, align 4
  ret void
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 76. PassManager<Function> : Skipping NOP
-- 77. PassManager<Function> : Skipping NOP
-- 78. InstCombinePass

----------------------------------------
define void @test17(ptr %x, i8 %y) {
entry:
  %x.load = load ptr, ptr %x, align 8
  store i8 %y, ptr %x.load, align 1
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 79. InstCombinePass

----------------------------------------
define void @test17(ptr %x, i8 %y) {
entry:
  %x.load = load ptr, ptr %x, align 8
  store i8 %y, ptr %x.load, align 1
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 80. PassManager<Function> : Skipping NOP
-- 81. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: swifterror
-- 82. InstCombinePass
ERROR: Unsupported attribute: swifterror
-- 83. InstCombinePass
ERROR: Unsupported attribute: swifterror
-- 84. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: swifterror
-- 85. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: swifterror
-- 86. InstCombinePass
ERROR: Unsupported attribute: swifterror
-- 87. InstCombinePass
ERROR: Unsupported attribute: swifterror
-- 88. PassManager<Function> : Skipping NOP
ERROR: Unsupported attribute: swifterror
-- 89. PassManager<Function> : Skipping NOP
ERROR: Unsupported type: <vscale x 4 x i8>
ERROR: Unsupported instruction:   %x.load = load <vscale x 4 x i8>, ptr %x, align 1
-- 90. InstCombinePass
ERROR: Unsupported type: <vscale x 4 x i8>
ERROR: Unsupported instruction:   %x.load = load <vscale x 4 x i8>, ptr %x, align 1
-- 91. InstCombinePass
ERROR: Unsupported type: <vscale x 4 x i8>
ERROR: Unsupported instruction:   %x.load = load <vscale x 4 x i8>, ptr %x, align 1
-- 92. PassManager<Function> : Skipping NOP
ERROR: Unsupported type: <vscale x 4 x i8>
ERROR: Unsupported instruction:   %x.load = load <vscale x 4 x i8>, ptr %x, align 1
-- 93. PassManager<Function> : Skipping NOP
-- 94. InstCombinePass

----------------------------------------
declare void @use(ptr)

define i64 @test21(ptr %P) {
#0:
  %X = load i64, ptr %P, align 8
  %Y = load ptr, ptr %P, align 8
  call void @use(ptr %Y)
  ret i64 %X
}
Transformation seems to be correct! (syntactically equal)

-- 95. InstCombinePass

----------------------------------------
declare void @use(ptr)

define i64 @test21(ptr %P) {
#0:
  %X = load i64, ptr %P, align 8
  %Y = load ptr, ptr %P, align 8
  call void @use(ptr %Y)
  ret i64 %X
}
=>
declare void @use(ptr)

define i64 @test21(ptr %P) {
#0:
  %X = load i64, ptr %P, align 8
  %Y.cast = int2ptr i64 %X to ptr
  call void @use(ptr %Y.cast)
  ret i64 %X
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
ptr %P = pointer(non-local, block_id=1, offset=2) / Address=#x0000000000000008

Source:
i64 %X = poison
ptr %Y = pointer(non-local, block_id=1, offset=1) / Address=#x0000000000000007
void = function did not return!

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 8	alloc type: 0	alive: false	address: 0
Block 1 >	size: 12	align: 1	alloc type: 0	alive: true	address: 6
Contents:
*: pointer(non-local, block_id=1, offset=1), byte offset=0

Block 2 >	size: 2	align: 1	alloc type: 0	alive: true	address: 1

Target:
i64 %X = poison
ptr %Y.cast = poison
void = function did not return!


Pass: InstCombinePass
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=instcombine' '-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_eX5LkKaz_sXy1.bc"


------------------- SMT STATS -------------------
Num queries: 64
Num invalid: 0
Num skips:   0
Num trivial: 92 (59.0%)
Num timeout: 1 (1.6%)
Num errors:  0 (0.0%)
Num SAT:     48 (75.0%)
Num UNSAT:   15 (23.4%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/load.ll

 

<-- Back