Test Failure: Transforms/InstCombine/fptrunc.ll

Test source: git

Comments: LLVM PR49080

Log:

Source: <stdin>

----------------------------------------
define float @fadd_fpext_op0(float %x, double %y) {
%0:
  %ext = fpext float %x to double, exceptions=ignore
  %bo = fadd reassoc double %ext, %y, exceptions=ignore
  %r = fptrunc double %bo to float, exceptions=ignore
  ret float %r
}
=>
define float @fadd_fpext_op0(float %x, double %y) {
%0:
  %ext = fpext float %x to double, exceptions=ignore
  %bo = fadd reassoc double %ext, %y, exceptions=ignore
  %r = fptrunc double %bo to float, exceptions=ignore
  ret float %r
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define half @fsub_fpext_op1(half %x, double %y) {
%0:
  %ext = fpext half %x to double, exceptions=ignore
  %bo = fsub reassoc double %y, %ext, exceptions=ignore
  %r = fptrunc double %bo to half, exceptions=ignore
  ret half %r
}
=>
define half @fsub_fpext_op1(half %x, double %y) {
%0:
  %ext = fpext half %x to double, exceptions=ignore
  %bo = fsub reassoc double %y, %ext, exceptions=ignore
  %r = fptrunc double %bo to half, exceptions=ignore
  ret half %r
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define <2 x float> @fdiv_constant_op0(<2 x double> %x) {
%0:
  %bo = fdiv reassoc <2 x double> { 42.100000, -0.100000 }, %x, exceptions=ignore
  %r = fptrunc <2 x double> %bo to <2 x float>, exceptions=ignore
  ret <2 x float> %r
}
=>
define <2 x float> @fdiv_constant_op0(<2 x double> %x) {
%0:
  %bo = fdiv reassoc <2 x double> { 42.100000, -0.100000 }, %x, exceptions=ignore
  %r = fptrunc <2 x double> %bo to <2 x float>, exceptions=ignore
  ret <2 x float> %r
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define <2 x half> @fmul_constant_op1(<2 x float> %x) {
%0:
  %bo = fmul reassoc <2 x float> %x, { 340282346638528859811704183484516925440.000000, 0.500000 }, exceptions=ignore
  %r = fptrunc <2 x float> %bo to <2 x half>, exceptions=ignore
  ret <2 x half> %r
}
=>
define <2 x half> @fmul_constant_op1(<2 x float> %x) {
%0:
  %bo = fmul reassoc <2 x float> %x, { 340282346638528859811704183484516925440.000000, 0.500000 }, exceptions=ignore
  %r = fptrunc <2 x float> %bo to <2 x half>, exceptions=ignore
  ret <2 x half> %r
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define float @fptrunc_select_true_val(float %x, double %y, i1 %cond) {
%0:
  %e = fpext float %x to double, exceptions=ignore
  %sel = select fast i1 %cond, double %y, double %e
  %r = fptrunc double %sel to float, exceptions=ignore
  ret float %r
}
=>
define float @fptrunc_select_true_val(float %x, double %y, i1 %cond) {
%0:
  %1 = fptrunc double %y to float, exceptions=ignore
  %narrow.sel = select fast i1 %cond, float %1, float %x
  ret float %narrow.sel
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
float %x = #x40720410 (3.781497955322?)
double %y = #x50b0006910800000 (474331919518124948269067391756814402474854811111096065390925381877605245952983040)
i1 %cond = undef

Source:
double %e = #x400e408200000000 (3.781497955322?)
double %sel = NaN	[based on undef value]
float %r = NaN

Target:
float %1 = #x7f800000 (+oo)
float %narrow.sel = poison
Source value: NaN
Target value: poison


------------------- SMT STATS -------------------
Num queries: 5
Num invalid: 0
Num skips:   0
Num trivial: 10 (66.7%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     5 (100.0%)
Num UNSAT:   0 (0.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nuno/llvm/build/bin/FileCheck /home/nuno/llvm/llvm/test/Transforms/InstCombine/fptrunc.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/fptrunc.ll

 

<-- Back