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
  %bo = fadd reassoc double %ext, %y
  %r = fptrunc double %bo to float
  ret float %r
}
=>
define float @fadd_fpext_op0(float %x, double %y) {
%0:
  %ext = fpext float %x to double
  %bo = fadd reassoc double %ext, %y
  %r = fptrunc double %bo to float
  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
  %bo = fsub reassoc double %y, %ext
  %r = fptrunc double %bo to half
  ret half %r
}
=>
define half @fsub_fpext_op1(half %x, double %y) {
%0:
  %ext = fpext half %x to double
  %bo = fsub reassoc double %y, %ext
  %r = fptrunc double %bo to half
  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
  %r = fptrunc <2 x double> %bo to <2 x float>
  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
  %r = fptrunc <2 x double> %bo to <2 x float>
  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 }
  %r = fptrunc <2 x float> %bo to <2 x half>
  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 }
  %r = fptrunc <2 x float> %bo to <2 x half>
  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
  %sel = select fast i1 %cond, double %y, double %e
  %r = fptrunc double %sel to float
  ret float %r
}
=>
define float @fptrunc_select_true_val(float %x, double %y, i1 %cond) {
%0:
  %1 = fptrunc double %y to float
  %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 = #x40b1fc40 (5.562042236328?)
double %y = #xda0000c20c008000 (-338523290712983894999434466218618683891502370056625456507061937578783311385947835327114095091242902701116934506027861105704960)
i1 %cond = #x1 (1)

Source:
double %e = #x40163f8800000000 (5.562042236328?)
double %sel = NaN
float %r = NaN

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


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

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/fptrunc.ll

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

 

<-- Back