Test Failure: Transforms/InstCombine/fabs.ll

Test source: git

Comments: LLVM PR59279

Log:

Source: <stdin>
ERROR: Unsupported instruction:   store volatile double %fpext, double* undef, align 8

----------------------------------------
define fp128 @replace_fabs_call_f128(fp128 %x) {
%0:
  %fabsl = call fp128 @fabsl(fp128 %x)
  ret fp128 %fabsl
}
=>
define fp128 @replace_fabs_call_f128(fp128 %x) {
%0:
  %fabsl = fabs fp128 %x
  ret fp128 %fabsl
}
Transformation doesn't verify!
ERROR: Couldn't prove the correctness of the transformation
Alive2 approximated the semantics of the programs and therefore we
cannot conclude whether the bug found is valid or not.

Approximations done:
 - Unknown libcall: @fabsl



----------------------------------------
define float @square_nnan_fabs_intrinsic_f32(float %x) {
%0:
  %mul = fmul nnan float %x, %x
  %fabsf = fabs float %mul
  ret float %fabsf
}
=>
define float @square_nnan_fabs_intrinsic_f32(float %x) {
%0:
  %mul = fmul nnan float %x, %x
  ret float %mul
}
Transformation seems to be correct!


----------------------------------------
define float @square_fabs_shrink_call1(float %x) {
%0:
  %ext = fpext float %x to double
  %sq = fmul double %ext, %ext
  %fabs = fabs double %sq
  %trunc = fptrunc double %fabs to float
  ret float %trunc
}
=>
define float @square_fabs_shrink_call1(float %x) {
%0:
  %1 = fmul float %x, %x
  %trunc = fabs float %1
  ret float %trunc
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @square_fabs_shrink_call2(float %x) {
%0:
  %sq = fmul float %x, %x
  %ext = fpext float %sq to double
  %fabs = fabs double %ext
  %trunc = fptrunc double %fabs to float
  ret float %trunc
}
=>
define float @square_fabs_shrink_call2(float %x) {
%0:
  %sq = fmul float %x, %x
  %1 = fabs float %sq
  ret float %1
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @fabs_select_constant_negative_positive(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -1.000000, float 2.000000
  %fabs = fabs float %select
  ret float %fabs
}
=>
define float @fabs_select_constant_negative_positive(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %fabs = select i1 %cmp, float 1.000000, float 2.000000
  ret float %fabs
}
Transformation seems to be correct!


----------------------------------------
define float @fabs_select_constant_positive_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float 1.000000, float -2.000000
  %fabs = fabs float %select
  ret float %fabs
}
=>
define float @fabs_select_constant_positive_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %fabs = select i1 %cmp, float 1.000000, float 2.000000
  ret float %fabs
}
Transformation seems to be correct!


----------------------------------------
define float @fabs_select_constant_negative_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -1.000000, float -2.000000
  %fabs = fabs float %select
  ret float %fabs
}
=>
define float @fabs_select_constant_negative_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %fabs = select i1 %cmp, float 1.000000, float 2.000000
  ret float %fabs
}
Transformation seems to be correct!


----------------------------------------
define float @fabs_select_constant_neg0(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -0.000000, float 0.000000
  %fabs = fabs float %select
  ret float %fabs
}
=>
define float @fabs_select_constant_neg0(i32 %c) {
%0:
  ret float 0.000000
}
Transformation seems to be correct!


----------------------------------------
define float @square_nnan_fma_fabs_intrinsic_f32(float %x) {
%0:
  %fma = fma nnan float %x, float %x, float 1.000000
  %fabsf = fabs float %fma
  ret float %fabsf
}
=>
define float @square_nnan_fma_fabs_intrinsic_f32(float %x) {
%0:
  %fma = fma nnan float %x, float %x, float 1.000000
  ret float %fma
}
Transformation doesn't verify!
ERROR: Timeout


----------------------------------------
define float @square_nnan_fmuladd_fabs_intrinsic_f32(float %x) {
%0:
  %fmuladd = call float @llvm.fmuladd.f32(float %x, float %x, float 1.000000) noread nowrite NNaN nofree
  %fabsf = fabs float %fmuladd
  ret float %fabsf
}
=>
define float @square_nnan_fmuladd_fabs_intrinsic_f32(float %x) {
%0:
  %fmuladd = call float @llvm.fmuladd.f32(float %x, float %x, float 1.000000) noread nowrite NNaN nofree
  ret float %fmuladd
}
Transformation doesn't verify!
ERROR: Couldn't prove the correctness of the transformation
Alive2 approximated the semantics of the programs and therefore we
cannot conclude whether the bug found is valid or not.

Approximations done:
 - Unknown libcall: @llvm.fmuladd.f32


ERROR: Unsupported instruction:   store volatile double %fpext, double* undef, align 8

----------------------------------------
define double @select_fcmp_nnan_ole_zero(double %x) {
%0:
  %lezero = fcmp ole double %x, 0.000000
  %negx = fsub nnan double 0.000000, %x
  %fabs = select i1 %lezero, double %negx, double %x
  ret double %fabs
}
=>
define double @select_fcmp_nnan_ole_zero(double %x) {
%0:
  %1 = fabs nnan double %x
  ret double %1
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
double %x = NaN

Source:
i1 %lezero = #x0 (0)
double %negx = poison
double %fabs = NaN

Target:
double %1 = poison
Source value: NaN
Target value: poison


------------------- SMT STATS -------------------
Num queries: 30
Num invalid: 0
Num skips:   0
Num trivial: 39 (56.5%)
Num timeout: 3 (10.0%)
Num errors:  0 (0.0%)
Num SAT:     14 (46.7%)
Num UNSAT:   13 (43.3%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -mtriple=x86_64-unknown-linux-gnu -instcombine -S
+ /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/InstCombine/fabs.ll

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

 

<-- Back