Extended Description
This is from Transforms/InstCombine/fneg.ll, reduced from fast to just nsz.
The issue is that the original fdiv has no nsz but the optimized one has. In this case, nsz can be propagated, but not added (even if fneg is nsz).
define float @fdiv_op0_constant_fneg_fmf(float %x) {
%d = fdiv float 42.000000, %x
%r = fneg nsz float %d
ret float %r
}
=>
define float @fdiv_op0_constant_fneg_fmf(float %x) {
%r = fdiv nsz float -42.000000, %x
ret float %r
}
Transformation doesn't verify!
ERROR: Value mismatch
Example:
float %x = #x80000000 (-0.0)
Source:
float %d = #xff800000 (-oo)
float %r = #x7f800000 (+oo)
Target:
float %r = #xff800000 (-oo)
Source value: #x7f800000 (+oo)
Target value: #xff800000 (-oo)
Extended Description
This is from Transforms/InstCombine/fneg.ll, reduced from fast to just nsz.
The issue is that the original fdiv has no nsz but the optimized one has. In this case, nsz can be propagated, but not added (even if fneg is nsz).
define float @fdiv_op0_constant_fneg_fmf(float %x) {
%d = fdiv float 42.000000, %x
%r = fneg nsz float %d
ret float %r
}
=>
define float @fdiv_op0_constant_fneg_fmf(float %x) {
%r = fdiv nsz float -42.000000, %x
ret float %r
}
Transformation doesn't verify!
ERROR: Value mismatch
Example:
float %x = #x80000000 (-0.0)
Source:
float %d = #xff800000 (-oo)
float %r = #x7f800000 (+oo)
Target:
float %r = #xff800000 (-oo)
Source value: #x7f800000 (+oo)
Target value: #xff800000 (-oo)