Test Failure: Transforms/EarlyCSE/commute.ll

Test source: git

Log:

Source: <stdin>
ERROR: Unsupported instruction:   %x = load volatile i32, ptr %px, align 4

----------------------------------------
define void @test1(float %A, float %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = fadd float %A, %B, exceptions=ignore
  store float %C, ptr %PA, align 4
  %D = fadd float %B, %A, exceptions=ignore
  store float %D, ptr %PB, align 4
  ret void
}
=>
define void @test1(float %A, float %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = fadd float %A, %B, exceptions=ignore
  store float %C, ptr %PA, align 4
  store float %C, ptr %PB, align 4
  ret void
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define void @test2(float %A, float %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = fcmp oeq float %A, %B
  store i1 %C, ptr %PA, align 1
  %D = fcmp oeq float %B, %A
  store i1 %D, ptr %PB, align 1
  ret void
}
=>
define void @test2(float %A, float %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = fcmp oeq float %A, %B
  store i1 %C, ptr %PA, align 1
  store i1 %C, ptr %PB, align 1
  ret void
}
Transformation seems to be correct!


----------------------------------------
define void @test3(float %A, float %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = fcmp uge float %A, %B
  store i1 %C, ptr %PA, align 1
  %D = fcmp ule float %B, %A
  store i1 %D, ptr %PB, align 1
  ret void
}
=>
define void @test3(float %A, float %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = fcmp uge float %A, %B
  store i1 %C, ptr %PA, align 1
  store i1 %C, ptr %PB, align 1
  ret void
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define void @test4(i32 %A, i32 %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = icmp eq i32 %A, %B
  store i1 %C, ptr %PA, align 1
  %D = icmp eq i32 %B, %A
  store i1 %D, ptr %PB, align 1
  ret void
}
=>
define void @test4(i32 %A, i32 %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = icmp eq i32 %A, %B
  store i1 %C, ptr %PA, align 1
  store i1 %C, ptr %PB, align 1
  ret void
}
Transformation seems to be correct!


----------------------------------------
define void @test5(i32 %A, i32 %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = icmp sgt i32 %A, %B
  store i1 %C, ptr %PA, align 1
  %D = icmp slt i32 %B, %A
  store i1 %D, ptr %PB, align 1
  ret void
}
=>
define void @test5(i32 %A, i32 %B, ptr %PA, ptr %PB) denormal-fp-math=ieee,ieee {
%0:
  %C = icmp sgt i32 %A, %B
  store i1 %C, ptr %PA, align 1
  store i1 %C, ptr %PB, align 1
  ret void
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define void @test6(float %f, ptr %p1, ptr %p2) denormal-fp-math=ieee,ieee {
%0:
  %c1 = fcmp ult float %f, %f
  %c2 = fcmp ugt float %f, %f
  store i1 %c1, ptr %p1, align 1
  store i1 %c2, ptr %p2, align 1
  ret void
}
=>
define void @test6(float %f, ptr %p1, ptr %p2) denormal-fp-math=ieee,ieee {
%0:
  %c1 = fcmp ult float %f, %f
  store i1 %c1, ptr %p1, align 1
  store i1 %c1, ptr %p2, align 1
  ret void
}
Transformation seems to be correct!


----------------------------------------
define i8 @smin_commute(i8 %a, i8 %b) denormal-fp-math=ieee,ieee {
%0:
  %cmp1 = icmp slt i8 %a, %b
  %cmp2 = icmp slt i8 %b, %a
  %m1 = select i1 %cmp1, i8 %a, i8 %b
  %m2 = select i1 %cmp2, i8 %b, i8 %a
  %r = mul i8 %m1, %m2
  ret i8 %r
}
=>
define i8 @smin_commute(i8 %a, i8 %b) denormal-fp-math=ieee,ieee {
%0:
  %cmp1 = icmp slt i8 %a, %b
  %m1 = select i1 %cmp1, i8 %a, i8 %b
  %r = mul i8 %m1, %m1
  ret i8 %r
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
i8 %a = #x80 (128, -128)
i8 %b = undef

Source:
i1 %cmp1 = #x1 (1)	[based on undef value]
i1 %cmp2 = #x0 (0)
i8 %m1 = #x80 (128, -128)
i8 %m2 = #x80 (128, -128)
i8 %r = #x00 (0)

Target:
i1 %cmp1 = #x0 (0)
i8 %m1 = #xa6 (166, -90)
i8 %r = #xee (238, -18)
Source value: #x00 (0)
Target value: #xee (238, -18)


------------------- SMT STATS -------------------
Num queries: 31
Num invalid: 0
Num skips:   0
Num trivial: 43 (58.1%)
Num timeout: 3 (9.7%)
Num errors:  0 (0.0%)
Num SAT:     22 (71.0%)
Num UNSAT:   6 (19.4%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -S -early-cse -earlycse-debug-hash
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/EarlyCSE/commute.ll

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

 

NOTE: This test would pass if undef didn't exist!

 

<-- Back