Test Failure: Transforms/InstCombine/signed-truncation-check.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define i1 @positive_with_signbit(i32 %arg) {
%0:
  %t1 = icmp sgt i32 %arg, 4294967295
  %t2 = add i32 %arg, 128
  %t3 = icmp ult i32 %t2, 256
  %t4 = and i1 %t1, %t3
  ret i1 %t4
}
=>
define i1 @positive_with_signbit(i32 %arg) {
%0:
  %t4.simplified = icmp ult i32 %arg, 128
  ret i1 %t4.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_signbit_logical(i32 %arg) {
%0:
  %t1 = icmp sgt i32 %arg, 4294967295
  %t2 = add i32 %arg, 128
  %t3 = icmp ult i32 %t2, 256
  %t4 = select i1 %t1, i1 %t3, i1 0
  ret i1 %t4
}
=>
define i1 @positive_with_signbit_logical(i32 %arg) {
%0:
  %t4.simplified = icmp ult i32 %arg, 128
  ret i1 %t4.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_mask(i32 %arg) {
%0:
  %t1 = and i32 %arg, 1107296256
  %t2 = icmp eq i32 %t1, 0
  %t3 = add i32 %arg, 128
  %t4 = icmp ult i32 %t3, 256
  %t5 = and i1 %t2, %t4
  ret i1 %t5
}
=>
define i1 @positive_with_mask(i32 %arg) {
%0:
  %t5.simplified = icmp ult i32 %arg, 128
  ret i1 %t5.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_mask_logical(i32 %arg) {
%0:
  %t1 = and i32 %arg, 1107296256
  %t2 = icmp eq i32 %t1, 0
  %t3 = add i32 %arg, 128
  %t4 = icmp ult i32 %t3, 256
  %t5 = select i1 %t2, i1 %t4, i1 0
  ret i1 %t5
}
=>
define i1 @positive_with_mask_logical(i32 %arg) {
%0:
  %t5.simplified = icmp ult i32 %arg, 128
  ret i1 %t5.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_icmp(i32 %arg) {
%0:
  %t1 = icmp ult i32 %arg, 512
  %t2 = add i32 %arg, 128
  %t3 = icmp ult i32 %t2, 256
  %t4 = and i1 %t1, %t3
  ret i1 %t4
}
=>
define i1 @positive_with_icmp(i32 %arg) {
%0:
  %t4.simplified = icmp ult i32 %arg, 128
  ret i1 %t4.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_icmp_logical(i32 %arg) {
%0:
  %t1 = icmp ult i32 %arg, 512
  %t2 = add i32 %arg, 128
  %t3 = icmp ult i32 %t2, 256
  %t4 = select i1 %t1, i1 %t3, i1 0
  ret i1 %t4
}
=>
define i1 @positive_with_icmp_logical(i32 %arg) {
%0:
  %t4.simplified = icmp ult i32 %arg, 128
  ret i1 %t4.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_aggressive_icmp(i32 %arg) {
%0:
  %t1 = icmp ult i32 %arg, 128
  %t2 = add i32 %arg, 256
  %t3 = icmp ult i32 %t2, 512
  %t4 = and i1 %t1, %t3
  ret i1 %t4
}
=>
define i1 @positive_with_aggressive_icmp(i32 %arg) {
%0:
  %t4.simplified = icmp ult i32 %arg, 128
  ret i1 %t4.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_aggressive_icmp_logical(i32 %arg) {
%0:
  %t1 = icmp ult i32 %arg, 128
  %t2 = add i32 %arg, 256
  %t3 = icmp ult i32 %t2, 512
  %t4 = select i1 %t1, i1 %t3, i1 0
  ret i1 %t4
}
=>
define i1 @positive_with_aggressive_icmp_logical(i32 %arg) {
%0:
  %t4.simplified = icmp ult i32 %arg, 128
  ret i1 %t4.simplified
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_extra_and(i32 %arg, i1 %z) {
%0:
  %t1 = icmp sgt i32 %arg, 4294967295
  %t2 = add i32 %arg, 128
  %t3 = icmp ult i32 %t2, 256
  %t4 = and i1 %t1, %z
  %t5 = and i1 %t3, %t4
  ret i1 %t5
}
=>
define i1 @positive_with_extra_and(i32 %arg, i1 %z) {
%0:
  %t5.simplified = icmp ult i32 %arg, 128
  %1 = and i1 %t5.simplified, %z
  ret i1 %1
}
Transformation seems to be correct!


----------------------------------------
define i1 @positive_with_extra_and_logical(i32 %arg, i1 %z) {
%0:
  %t1 = icmp sgt i32 %arg, 4294967295
  %t2 = add i32 %arg, 128
  %t3 = icmp ult i32 %t2, 256
  %t4 = select i1 %t1, i1 %z, i1 0
  %t5 = select i1 %t3, i1 %t4, i1 0
  ret i1 %t5
}
=>
define i1 @positive_with_extra_and_logical(i32 %arg, i1 %z) {
%0:
  %t5.simplified = icmp ult i32 %arg, 128
  %1 = and i1 %t5.simplified, %z
  ret i1 %1
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
i32 %arg = #x80000000 (2147483648, -2147483648)
i1 %z = poison

Source:
i1 %t1 = #x0 (0)
i32 %t2 = #x80000080 (2147483776, -2147483520)
i1 %t3 = #x0 (0)
i1 %t4 = #x0 (0)
i1 %t5 = #x0 (0)

Target:
i1 %t5.simplified = #x0 (0)
i1 %1 = poison
Source value: #x0 (0)
Target value: poison


------------------- SMT STATS -------------------
Num queries: 34
Num invalid: 0
Num skips:   0
Num trivial: 33 (49.3%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     11 (32.4%)
Num UNSAT:   23 (67.6%)

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/signed-truncation-check.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/signed-truncation-check.ll

 

<-- Back