Test Failure: Transforms/InstCombine/fcmp-fadd-select.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. InstCombinePass

----------------------------------------
define float @test_fcmp_ogt_fadd_select_constant(float %in) {
#0:
  %cmp1 = fcmp ogt float %in, 0.000000
  %add = fadd float %in, 1.000000
  %sel = select nnan nsz i1 %cmp1, float %add, float 1.000000
  ret float %sel
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
define float @test_fcmp_ogt_fadd_select_constant(float %in) {
#0:
  %cmp1 = fcmp ogt float %in, 0.000000
  %add = fadd float %in, 1.000000
  %sel = select nnan nsz i1 %cmp1, float %add, float 1.000000
  ret float %sel
}
=>
define float @test_fcmp_ogt_fadd_select_constant(float %in) {
#0:
  %sel = fmax nnan nsz float %in, 0.000000
  %add = fadd nnan nsz float %sel, 1.000000
  ret float %add
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source

Example:
float %in = #x7f800002 (SNaN)

Source:
i1 %cmp1 = #x0 (0)
float %add = #x7f800002 (SNaN)
float %sel = #x3f800000 (1)

Target:
float %sel = poison
float %add = poison
Source value: #x3f800000 (1)
Target value: poison

Pass: InstCombinePass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-passes=instcombine' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_4Yvrve5Y_tyMs.bc"


------------------- SMT STATS -------------------
Num queries: 22
Num invalid: 0
Num skips:   0
Num trivial: 7 (24.1%)
Num timeout: 1 (4.5%)
Num errors:  0 (0.0%)
Num SAT:     16 (72.7%)
Num UNSAT:   5 (22.7%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-fadd-select.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-fadd-select.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-fadd-select.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-fadd-select.ll

 

<-- Back