Test Failure: Transforms/InstCombine/rem.ll

Test source: git

Log:

Source: <stdin>
ERROR: Unsupported instruction:   %v = load volatile i32, i32* %p, align 4
ERROR: Unsupported instruction:   %v = load volatile i32, i32* %p, align 4
ERROR: Unsupported instruction:   %v = load volatile i32, i32* %p, align 4
ERROR: Unsupported instruction:   %v = load volatile i32, i32* %p, align 4
ERROR: Unsupported instruction:   %v = load volatile i32, i32* %p, align 4

----------------------------------------
define i64 @rem_signed(i64 %x1, i64 %y2) {
%0:
  %r = sdiv i64 %x1, %y2
  %r7 = mul i64 %r, %y2
  %r8 = sub i64 %x1, %r7
  ret i64 %r8
}
=>
define i64 @rem_signed(i64 %x1, i64 %y2) {
%0:
  %1 = srem i64 %x1, %y2
  ret i64 %1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define <4 x i32> @rem_signed_vec(<4 x i32> %t, <4 x i32> %u) {
%0:
  %k = sdiv <4 x i32> %t, %u
  %l = mul <4 x i32> %k, %u
  %m = sub <4 x i32> %t, %l
  ret <4 x i32> %m
}
=>
define <4 x i32> @rem_signed_vec(<4 x i32> %t, <4 x i32> %u) {
%0:
  %1 = srem <4 x i32> %t, %u
  ret <4 x i32> %1
}
Transformation seems to be correct!


----------------------------------------
define i64 @rem_unsigned(i64 %x1, i64 %y2) {
%0:
  %r = udiv i64 %x1, %y2
  %r7 = mul i64 %r, %y2
  %r8 = sub i64 %x1, %r7
  ret i64 %r8
}
=>
define i64 @rem_unsigned(i64 %x1, i64 %y2) {
%0:
  %1 = urem i64 %x1, %y2
  ret i64 %1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define i8 @big_divisor(i8 %x) {
%0:
  %rem = urem i8 %x, 129
  ret i8 %rem
}
=>
define i8 @big_divisor(i8 %x) {
%0:
  %1 = icmp ult i8 %x, 129
  %2 = add i8 %x, 127
  %rem = select i1 %1, i8 %x, i8 %2
  ret i8 %rem
}
Transformation doesn't verify!
ERROR: Value mismatch

Example:
i8 %x = undef

Source:
i8 %rem = #x00 (0)	[based on undef value]

Target:
i1 %1 = #x0 (0)
i8 %2 = #x82 (130, -126)
i8 %rem = #x82 (130, -126)
Source value: #x00 (0)
Target value: #x82 (130, -126)


------------------- SMT STATS -------------------
Num queries: 21
Num invalid: 0
Num skips:   0
Num trivial: 19 (47.5%)
Num timeout: 2 (9.5%)
Num errors:  0 (0.0%)
Num SAT:     14 (66.7%)
Num UNSAT:   5 (23.8%)
Alive2: Transform doesn't verify; aborting!

stderr:

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

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstCombine/rem.ll

 

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

 

<-- Back