-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Labels
floating-pointFloating-point mathFloating-point mathgenerated by fuzzerllvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmiscompilation
Description
Reproducer: https://alive2.llvm.org/ce/z/GNeZKU
; bin/opt -passes=instcombine test.ll -S
define float @select_fpclass_fadd(i1 %cond, float nofpclass(nan) %A, float %B) {
%C = fadd float %A, %B
%D = select ninf i1 %cond, float %C, float %A
ret float %D
}
=>
define float @select_fpclass_fadd(i1 %cond, float nofpclass(3) %A, float %B) {
#0:
%C = select ninf i1 %cond, float %B, float -0.000000
%D = fadd float nofpclass(3) %A, %C
ret float %D
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source
Example:
i1 %cond = #x1 (1)
float nofpclass(3) %A = #xff800000 (-oo)
float %B = #x7f800000 (+oo)
Source:
float %C = #xffc00000 (QNaN)
float %D = #xffc00000 (QNaN)
Target:
float %C = poison
float %D = poison
Source value: #xffc00000 (QNaN)
Target value: poison
Metadata
Metadata
Assignees
Labels
floating-pointFloating-point mathFloating-point mathgenerated by fuzzerllvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmiscompilation