Description
Reproducer: https://alive2.llvm.org/ce/z/GnztNF
; bin/opt -passes=instcombine test.ll -S
define half @src(float %x) {
%abs = call ninf float @llvm.fabs(float %x)
%trunc = fptrunc float %abs to half
ret half %trunc
}
----------------------------------------
define half @src(float %x) {
#0:
%abs = fabs ninf float %x
%trunc = fptrunc float %abs to half
ret half %trunc
}
=>
define half @src(float %x) nofree willreturn memory(none) {
#0:
%#1 = fptrunc float %x to half
%trunc = fabs ninf half %#1
ret half %trunc
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source
Example:
float %x = #x50802003 (17196652544)
Source:
float %abs = #x50802003 (17196652544)
half %trunc = #x7c00 (+oo)
Target:
half %#1 = #x7c00 (+oo)
half %trunc = poison
Source value: #x7c00 (+oo)
Target value: poison
Summary:
0 correct transformations
1 incorrect transformations
0 failed-to-prove transformations
0 Alive2 errors