Test Failure: Transforms/InstCombine/demorgan.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i43 @demorgan_or_apint1(i43 %A, i43 %B) {
%0:
  %NotA = xor i43 %A, 8796093022207
  %NotB = xor i43 %B, 8796093022207
  %C = or i43 %NotA, %NotB
  ret i43 %C
}
=>
define i43 @demorgan_or_apint1(i43 %A, i43 %B) {
%0:
  %C.demorgan = and i43 %A, %B
  %C = xor i43 %C.demorgan, 8796093022207
  ret i43 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i129 @demorgan_or_apint2(i129 %A, i129 %B) {
%0:
  %NotA = xor i129 %A, 680564733841876926926749214863536422911
  %NotB = xor i129 %B, 680564733841876926926749214863536422911
  %C = or i129 %NotA, %NotB
  ret i129 %C
}
=>
define i129 @demorgan_or_apint2(i129 %A, i129 %B) {
%0:
  %C.demorgan = and i129 %A, %B
  %C = xor i129 %C.demorgan, 680564733841876926926749214863536422911
  ret i129 %C
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i477 @demorgan_and_apint1(i477 %A, i477 %B) {
%0:
  %NotA = xor i477 %A, 390218568789499028922699653724145788218574767833121393857394619953171467352470702515038262882936496394978366390175827861930996959911035663286271
  %NotB = xor i477 %B, 390218568789499028922699653724145788218574767833121393857394619953171467352470702515038262882936496394978366390175827861930996959911035663286271
  %C = and i477 %NotA, %NotB
  ret i477 %C
}
=>
define i477 @demorgan_and_apint1(i477 %A, i477 %B) {
%0:
  %C.demorgan = or i477 %A, %B
  %C = xor i477 %C.demorgan, 390218568789499028922699653724145788218574767833121393857394619953171467352470702515038262882936496394978366390175827861930996959911035663286271
  ret i477 %C
}
Transformation seems to be correct!


----------------------------------------
define i129 @demorgan_and_apint2(i129 %A, i129 %B) {
%0:
  %NotA = xor i129 %A, 680564733841876926926749214863536422911
  %NotB = xor i129 %B, 680564733841876926926749214863536422911
  %C = and i129 %NotA, %NotB
  ret i129 %C
}
=>
define i129 @demorgan_and_apint2(i129 %A, i129 %B) {
%0:
  %C.demorgan = or i129 %A, %B
  %C = xor i129 %C.demorgan, 680564733841876926926749214863536422911
  ret i129 %C
}
Transformation seems to be correct!


----------------------------------------
define i65 @demorgan_and_apint3(i65 %A, i65 %B) {
%0:
  %NotA = xor i65 %A, 36893488147419103231
  %NotB = xor i65 36893488147419103231, %B
  %C = and i65 %NotA, %NotB
  ret i65 %C
}
=>
define i65 @demorgan_and_apint3(i65 %A, i65 %B) {
%0:
  %C.demorgan = or i65 %A, %B
  %C = xor i65 %C.demorgan, 36893488147419103231
  ret i65 %C
}
Transformation seems to be correct!


----------------------------------------
define i66 @demorgan_and_apint4(i66 %A, i66 %B) {
%0:
  %NotA = xor i66 %A, 73786976294838206463
  %NotB = xor i66 %B, 73786976294838206463
  %C = and i66 %NotA, %NotB
  ret i66 %C
}
=>
define i66 @demorgan_and_apint4(i66 %A, i66 %B) {
%0:
  %C.demorgan = or i66 %A, %B
  %C = xor i66 %C.demorgan, 73786976294838206463
  ret i66 %C
}
Transformation seems to be correct!


----------------------------------------
define i47 @demorgan_and_apint5(i47 %A, i47 %B) {
%0:
  %NotA = xor i47 %A, 140737488355327
  %NotB = xor i47 %B, 140737488355327
  %C = and i47 %NotA, %NotB
  ret i47 %C
}
=>
define i47 @demorgan_and_apint5(i47 %A, i47 %B) {
%0:
  %C.demorgan = or i47 %A, %B
  %C = xor i47 %C.demorgan, 140737488355327
  ret i47 %C
}
Transformation seems to be correct!


----------------------------------------
define i32 @test3(i32 %A, i32 %B) {
%0:
  %nota = xor i32 %A, 4294967295
  %notb = xor i32 %B, 4294967295
  %c = and i32 %nota, %notb
  %notc = xor i32 %c, 4294967295
  ret i32 %notc
}
=>
define i32 @test3(i32 %A, i32 %B) {
%0:
  %c.demorgan = or i32 %A, %B
  ret i32 %c.demorgan
}
Transformation seems to be correct!


----------------------------------------
define i32 @test4(i32 %A) {
%0:
  %nota = xor i32 %A, 4294967295
  %c = and i32 %nota, 5
  %notc = xor i32 %c, 4294967295
  ret i32 %notc
}
=>
define i32 @test4(i32 %A) {
%0:
  %notc1 = or i32 %A, 4294967290
  ret i32 %notc1
}
Transformation seems to be correct!


----------------------------------------
define i32 @test5(i32 %A, i32 %B) {
%0:
  %nota = xor i32 %A, 4294967295
  %notb = xor i32 %B, 4294967295
  %c = or i32 %nota, %notb
  %notc = xor i32 %c, 4294967295
  ret i32 %notc
}
=>
define i32 @test5(i32 %A, i32 %B) {
%0:
  %c.demorgan = and i32 %A, %B
  ret i32 %c.demorgan
}
Transformation seems to be correct!


----------------------------------------
define i47 @test3_apint(i47 %A, i47 %B) {
%0:
  %nota = xor i47 %A, 140737488355327
  %notb = xor i47 %B, 140737488355327
  %c = and i47 %nota, %notb
  %notc = xor i47 %c, 140737488355327
  ret i47 %notc
}
=>
define i47 @test3_apint(i47 %A, i47 %B) {
%0:
  %c.demorgan = or i47 %A, %B
  ret i47 %c.demorgan
}
Transformation seems to be correct!


----------------------------------------
define i61 @test4_apint(i61 %A) {
%0:
  %nota = xor i61 %A, 2305843009213693951
  %c = and i61 %nota, 5
  %notc = xor i61 %c, 2305843009213693951
  ret i61 %c
}
=>
define i61 @test4_apint(i61 %A) {
%0:
  %nota = and i61 %A, 5
  %c = xor i61 %nota, 5
  ret i61 %c
}
Transformation seems to be correct!


----------------------------------------
define i71 @test5_apint(i71 %A, i71 %B) {
%0:
  %nota = xor i71 %A, 2361183241434822606847
  %notb = xor i71 %B, 2361183241434822606847
  %c = or i71 %nota, %notb
  %notc = xor i71 %c, 2361183241434822606847
  ret i71 %notc
}
=>
define i71 @test5_apint(i71 %A, i71 %B) {
%0:
  %c.demorgan = and i71 %A, %B
  ret i71 %c.demorgan
}
Transformation seems to be correct!


----------------------------------------
define i8 @demorgan_nand(i8 %A, i8 %B) {
%0:
  %notx = xor i8 %A, 255
  %c = and i8 %notx, %B
  %notc = xor i8 %c, 255
  ret i8 %notc
}
=>
define i8 @demorgan_nand(i8 %A, i8 %B) {
%0:
  %B.not = xor i8 %B, 255
  %notc = or i8 %B.not, %A
  ret i8 %notc
}
Transformation seems to be correct!


----------------------------------------
define i7 @demorgan_nand_apint1(i7 %A, i7 %B) {
%0:
  %nota = xor i7 %A, 127
  %c = and i7 %nota, %B
  %notc = xor i7 %c, 127
  ret i7 %notc
}
=>
define i7 @demorgan_nand_apint1(i7 %A, i7 %B) {
%0:
  %B.not = xor i7 %B, 127
  %notc = or i7 %B.not, %A
  ret i7 %notc
}
Transformation seems to be correct!


----------------------------------------
define i117 @demorgan_nand_apint2(i117 %A, i117 %B) {
%0:
  %nota = xor i117 %A, 166153499473114484112975882535043071
  %c = and i117 %nota, %B
  %notc = xor i117 %c, 166153499473114484112975882535043071
  ret i117 %notc
}
=>
define i117 @demorgan_nand_apint2(i117 %A, i117 %B) {
%0:
  %B.not = xor i117 %B, 166153499473114484112975882535043071
  %notc = or i117 %B.not, %A
  ret i117 %notc
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i8 @demorgan_nor(i8 %A, i8 %B) {
%0:
  %notx = xor i8 %A, 255
  %c = or i8 %notx, %B
  %notc = xor i8 %c, 255
  ret i8 %notc
}
=>
define i8 @demorgan_nor(i8 %A, i8 %B) {
%0:
  %B.not = xor i8 %B, 255
  %notc = and i8 %B.not, %A
  ret i8 %notc
}
Transformation seems to be correct!


----------------------------------------
define i8 @demorgan_nor_use2a(i8 %A, i8 %B) {
%0:
  %nota = xor i8 %A, 255
  %use2a = mul i8 %nota, 23
  %c = or i8 %nota, %B
  %notc = xor i8 %c, 255
  %r = sdiv i8 %notc, %use2a
  ret i8 %r
}
=>
define i8 @demorgan_nor_use2a(i8 %A, i8 %B) {
%0:
  %nota = xor i8 %A, 255
  %use2a = mul i8 %nota, 23
  %B.not = xor i8 %B, 255
  %notc = and i8 %B.not, %A
  %r = sdiv i8 %notc, %use2a
  ret i8 %r
}
Transformation seems to be correct!


----------------------------------------
define i8 @demorgan_nor_use2b(i8 %A, i8 %B) {
%0:
  %use2b = mul i8 %B, 23
  %nota = xor i8 %A, 255
  %c = or i8 %nota, %B
  %notc = xor i8 %c, 255
  %r = sdiv i8 %notc, %use2b
  ret i8 %r
}
=>
define i8 @demorgan_nor_use2b(i8 %A, i8 %B) {
%0:
  %use2b = mul i8 %B, 23
  %B.not = xor i8 %B, 255
  %notc = and i8 %B.not, %A
  %r = sdiv i8 %notc, %use2b
  ret i8 %r
}
Transformation seems to be correct!


----------------------------------------
define i8 @demorgan_nor_use2c(i8 %A, i8 %B) {
%0:
  %nota = xor i8 %A, 255
  %c = or i8 %nota, %B
  %use2c = mul i8 %c, 23
  %notc = xor i8 %c, 255
  %r = sdiv i8 %notc, %use2c
  ret i8 %r
}
=>
define i8 @demorgan_nor_use2c(i8 %A, i8 %B) {
%0:
  %nota = xor i8 %A, 255
  %c = or i8 %nota, %B
  %use2c = mul i8 %c, 23
  %notc = xor i8 %c, 255
  %r = sdiv i8 %notc, %use2c
  ret i8 %r
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i8 @demorgan_nor_use2ab(i8 %A, i8 %B) {
%0:
  %use2b = mul i8 %B, 23
  %nota = xor i8 %A, 255
  %use2a = mul i8 %nota, 17
  %c = or i8 %nota, %B
  %notc = xor i8 %c, 255
  %r1 = sdiv i8 %notc, %use2b
  %r2 = sdiv i8 %r1, %use2a
  ret i8 %r2
}
=>
define i8 @demorgan_nor_use2ab(i8 %A, i8 %B) {
%0:
  %use2b = mul i8 %B, 23
  %nota = xor i8 %A, 255
  %use2a = mul i8 %nota, 17
  %B.not = xor i8 %B, 255
  %notc = and i8 %B.not, %A
  %r1 = sdiv i8 %notc, %use2b
  %r2 = sdiv i8 %r1, %use2a
  ret i8 %r2
}
Transformation seems to be correct!


----------------------------------------
define i8 @demorgan_nor_use2ac(i8 %A, i8 %B) {
%0:
  %nota = xor i8 %A, 255
  %use2a = mul i8 %nota, 17
  %c = or i8 %nota, %B
  %use2c = mul i8 %c, 23
  %notc = xor i8 %c, 255
  %r1 = sdiv i8 %notc, %use2c
  %r2 = sdiv i8 %r1, %use2a
  ret i8 %r2
}
=>
define i8 @demorgan_nor_use2ac(i8 %A, i8 %B) {
%0:
  %nota = xor i8 %A, 255
  %use2a = mul i8 %nota, 17
  %c = or i8 %nota, %B
  %use2c = mul i8 %c, 23
  %notc = xor i8 %c, 255
  %r1 = sdiv i8 %notc, %use2c
  %r2 = sdiv i8 %r1, %use2a
  ret i8 %r2
}
Transformation seems to be correct!


----------------------------------------
define i8 @demorgan_nor_use2bc(i8 %A, i8 %B) {
%0:
  %use2b = mul i8 %B, 23
  %nota = xor i8 %A, 255
  %c = or i8 %nota, %B
  %use2c = mul i8 %c, 23
  %notc = xor i8 %c, 255
  %r1 = sdiv i8 %notc, %use2c
  %r2 = sdiv i8 %r1, %use2b
  ret i8 %r2
}
=>
define i8 @demorgan_nor_use2bc(i8 %A, i8 %B) {
%0:
  %use2b = mul i8 %B, 23
  %nota = xor i8 %A, 255
  %c = or i8 %nota, %B
  %use2c = mul i8 %c, 23
  %notc = xor i8 %c, 255
  %r1 = sdiv i8 %notc, %use2c
  %r2 = sdiv i8 %r1, %use2b
  ret i8 %r2
}
Transformation seems to be correct!


----------------------------------------
define i32 @demorganize_constant1(i32 %a) {
%0:
  %and = and i32 %a, 15
  %and1 = xor i32 %and, 4294967295
  ret i32 %and1
}
=>
define i32 @demorganize_constant1(i32 %a) {
%0:
  %and = and i32 %a, 15
  %and1 = xor i32 %and, 4294967295
  ret i32 %and1
}
Transformation seems to be correct!


----------------------------------------
define i32 @demorganize_constant2(i32 %a) {
%0:
  %and = or i32 %a, 15
  %and1 = xor i32 %and, 4294967295
  ret i32 %and1
}
=>
define i32 @demorganize_constant2(i32 %a) {
%0:
  %and = or i32 %a, 15
  %and1 = xor i32 %and, 4294967295
  ret i32 %and1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i32 @demorgan_or_zext(i1 %X, i1 %Y) {
%0:
  %zextX = zext i1 %X to i32
  %zextY = zext i1 %Y to i32
  %notX = xor i32 %zextX, 1
  %notY = xor i32 %zextY, 1
  %or = or i32 %notX, %notY
  ret i32 %or
}
=>
define i32 @demorgan_or_zext(i1 %X, i1 %Y) {
%0:
  %or1.demorgan = and i1 %X, %Y
  %or1 = xor i1 %or1.demorgan, 1
  %or = zext i1 %or1 to i32
  ret i32 %or
}
Transformation seems to be correct!


----------------------------------------
define i32 @demorgan_and_zext(i1 %X, i1 %Y) {
%0:
  %zextX = zext i1 %X to i32
  %zextY = zext i1 %Y to i32
  %notX = xor i32 %zextX, 1
  %notY = xor i32 %zextY, 1
  %and = and i32 %notX, %notY
  ret i32 %and
}
=>
define i32 @demorgan_and_zext(i1 %X, i1 %Y) {
%0:
  %and1.demorgan = or i1 %X, %Y
  %and1 = xor i1 %and1.demorgan, 1
  %and = zext i1 %and1 to i32
  ret i32 %and
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @demorgan_or_zext_vec(<2 x i1> %X, <2 x i1> %Y) {
%0:
  %zextX = zext <2 x i1> %X to <2 x i32>
  %zextY = zext <2 x i1> %Y to <2 x i32>
  %notX = xor <2 x i32> %zextX, { 1, 1 }
  %notY = xor <2 x i32> %zextY, { 1, 1 }
  %or = or <2 x i32> %notX, %notY
  ret <2 x i32> %or
}
=>
define <2 x i32> @demorgan_or_zext_vec(<2 x i1> %X, <2 x i1> %Y) {
%0:
  %or1.demorgan = and <2 x i1> %X, %Y
  %or1 = xor <2 x i1> %or1.demorgan, { 1, 1 }
  %or = zext <2 x i1> %or1 to <2 x i32>
  ret <2 x i32> %or
}
Transformation seems to be correct!


----------------------------------------
define <2 x i32> @demorgan_and_zext_vec(<2 x i1> %X, <2 x i1> %Y) {
%0:
  %zextX = zext <2 x i1> %X to <2 x i32>
  %zextY = zext <2 x i1> %Y to <2 x i32>
  %notX = xor <2 x i32> %zextX, { 1, 1 }
  %notY = xor <2 x i32> %zextY, { 1, 1 }
  %and = and <2 x i32> %notX, %notY
  ret <2 x i32> %and
}
=>
define <2 x i32> @demorgan_and_zext_vec(<2 x i1> %X, <2 x i1> %Y) {
%0:
  %and1.demorgan = or <2 x i1> %X, %Y
  %and1 = xor <2 x i1> %and1.demorgan, { 1, 1 }
  %and = zext <2 x i1> %and1 to <2 x i32>
  ret <2 x i32> %and
}
Transformation seems to be correct!


----------------------------------------
define i32 @PR28476(i32 %x, i32 %y) {
%0:
  %cmp0 = icmp ne i32 %x, 0
  %cmp1 = icmp ne i32 %y, 0
  %and = and i1 %cmp0, %cmp1
  %zext = zext i1 %and to i32
  %cond = xor i32 %zext, 1
  ret i32 %cond
}
=>
define i32 @PR28476(i32 %x, i32 %y) {
%0:
  %cmp0 = icmp eq i32 %x, 0
  %cmp1 = icmp eq i32 %y, 0
  %1 = or i1 %cmp0, %cmp1
  %cond = zext i1 %1 to i32
  ret i32 %cond
}
Transformation seems to be correct!


----------------------------------------
define i32 @PR28476_logical(i32 %x, i32 %y) {
%0:
  %cmp0 = icmp ne i32 %x, 0
  %cmp1 = icmp ne i32 %y, 0
  %and = select i1 %cmp0, i1 %cmp1, i1 0
  %zext = zext i1 %and to i32
  %cond = xor i32 %zext, 1
  ret i32 %cond
}
=>
define i32 @PR28476_logical(i32 %x, i32 %y) {
%0:
  %cmp0 = icmp eq i32 %x, 0
  %cmp1 = icmp eq i32 %y, 0
  %1 = or i1 %cmp0, %cmp1
  %cond = zext i1 %1 to i32
  ret i32 %cond
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i32 %x = #x00000000 (0)
i32 %y = poison

Source:
i1 %cmp0 = #x0 (0)
i1 %cmp1 = poison
i1 %and = #x0 (0)
i32 %zext = #x00000000 (0)
i32 %cond = #x00000001 (1)

Target:
i1 %cmp0 = #x1 (1)
i1 %cmp1 = poison
i1 %1 = poison
i32 %cond = poison
Source value: #x00000001 (1)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 105
Num invalid: 0
Num skips:   0
Num trivial: 104 (49.8%)
Num timeout: 5 (4.8%)
Num errors:  0 (0.0%)
Num SAT:     32 (30.5%)
Num UNSAT:   68 (64.8%)

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/demorgan.ll

Alive2: Transform doesn't verify; aborting!
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/demorgan.ll

 

<-- Back