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

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<llvm::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 nsz float %in, 0.000000
  %add = fadd nnan nsz float %sel, 1.000000
  ret float %add
}
Transformation seems to be correct!

-- 4. PassManager<llvm::Function> : Skipping NOP
-- 5. PassManager<llvm::Function> : Skipping NOP
-- 6. InstCombinePass

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

-- 7. InstCombinePass

----------------------------------------
define float @test_fcmp_ogt_fadd_select_constant_swapped(float %in) {
#0:
  %cmp1 = fcmp ogt float %in, 0.000000
  %add = fadd float %in, 1.000000
  %sel = select nnan nsz i1 %cmp1, float 1.000000, float %add
  ret float %sel
}
=>
define float @test_fcmp_ogt_fadd_select_constant_swapped(float %in) {
#0:
  %sel = fmax nsz float %in, 0.000000
  %add = fadd nnan nsz float %sel, 1.000000
  ret float %add
}
Transformation doesn't verify! (unsound)
ERROR: Value mismatch

Example:
float %in = #xbf840ffe (-1.031738042831?)

Source:
i1 %cmp1 = #x0 (0)
float %add = #xbd01ffc0 (-0.031738042831?)
float %sel = #xbd01ffc0 (-0.031738042831?)

Target:
float %sel = #x00000000 (+0.0)
float %add = #x3f800000 (1)
Source value: #xbd01ffc0 (-0.031738042831?)
Target value: #x3f800000 (1)

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_aOFRdsFT_8Sjp.bc"


------------------- SMT STATS -------------------
Num queries: 30
Num invalid: 0
Num skips:   0
Num trivial: 13 (30.2%)
Num timeout: 2 (6.7%)
Num errors:  0 (0.0%)
Num SAT:     16 (53.3%)
Num UNSAT:   12 (40.0%)
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