Test Failure: Transforms/InstCombine/double-float-shrink-2.ll

Test source: git

Comments: LLVM PR49080

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
ERROR: Unsupported instruction:   store volatile double %D, ptr undef, align 4
ERROR: Unsupported instruction:   store volatile double %D, ptr undef, align 4
-- 1. PassManager<Function> : Skipping NOP
-- 2. InstCombinePass

----------------------------------------
declare double @floor(double)

define float @test_shrink_libcall_floor(float %C) {
#0:
  %D = fpext float %C to double
  %E = floor double %D
  %F = fptrunc double %E to float
  ret float %F
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
declare double @floor(double)

define float @test_shrink_libcall_floor(float %C) {
#0:
  %D = fpext float %C to double
  %E = floor double %D
  %F = fptrunc double %E to float
  ret float %F
}
=>
define float @test_shrink_libcall_floor(float %C) {
#0:
  %#1 = floor float %C
  ret float %#1
}
Transformation doesn't verify! (unsound)
ERROR: Value mismatch

Example:
float %C = #x7f801001 (SNaN)

Source:
double %D = #x7ff8000000000000 (QNaN)
double %E = #x7ff8000000000000 (QNaN)
float %F = #x7fc00000 (QNaN)

Target:
float %#1 = #x7f801001 (SNaN)
Source value: #x7fc00000 (QNaN)
Target value: #x7f801001 (SNaN)

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' '-mtriple' 'i386-pc-linux' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_nT2gIvTP_MLAl.bc"


------------------- SMT STATS -------------------
Num queries: 18
Num invalid: 0
Num skips:   0
Num trivial: 10 (35.7%)
Num timeout: 3 (16.7%)
Num errors:  0 (0.0%)
Num SAT:     14 (77.8%)
Num UNSAT:   1 (5.6%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 3: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll -passes=instcombine -S -mtriple "i386-pc-linux"     | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll --check-prefixes=CHECK,DOUBLE-4BYTE-ALIGN
+ /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S -mtriple i386-pc-linux
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll --check-prefixes=CHECK,DOUBLE-4BYTE-ALIGN

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll --check-prefixes=CHECK,DOUBLE-4BYTE-ALIGN

 

NOTE: This test would pass if undef didn't exist!

 

<-- Back