search for: x8000

Displaying 2 results from an estimated 2 matches for "x8000".

Did you mean: 8000
2020 Feb 07
3
Why does FPBinOp(X, undef) -> NaN?
I came across this comment in SelectionDAG.cpp: case ISD::FADD: case ISD::FSUB: case ISD::FMUL: case ISD::FDIV: case ISD::FREM: // If both operands are undef, the result is undef. If 1 operand is undef, // the result is NaN. This should match the behavior of the IR optimizer. That isn't intuitive to me. I would have expected a binary FP operation with one undef operand to
2020 Feb 07
2
Why does FPBinOp(X, undef) -> NaN?
...half @fn(half %a) { > ret half undef > } > Transformation doesn't verify! > ERROR: Value mismatch > > Example: > half %a = #x0e02 (0.000366687774?) > > Source: > half %b = NaN [based on undef value] > > Target: > Source value: NaN > Target value: #x8000 (-0.0) > > > Essentially, for some inputs, doing an operation with any value can't > produce some value, as the example above shows. Ok, I can buy that. We're picking NaN for the value of the undef operand since the result will always be a NaN. So a few lines below this, we ha...