[PATCH] D88572: AMDGPU/SelectionDAG Check for NaN, DX10Clamp and IEEE in fmed3 combine
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 04:14:04 PDT 2020
Petar.Avramovic added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:9847
// register pressure for no benefit.
if (Opc != AMDGPUISD::FMIN_LEGACY && Opc != AMDGPUISD::FMAX_LEGACY &&
----------------
This patch fixes clamp and fmed3 folds that could be incorrect with IEEE=true(potential not-silenced SNaN inputs).
@arsenm Folding ISD::FMAXNUM with IEEE=true into max3 here could be incorrect when one of the inputs is SNaN. There are no correctness issues with IEEE=false.
Thoughts on moving this combine after legalizer? We could also potentially move min3/max3 and min/max patterns with constants to td file so that global-isel can use them as well.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88572/new/
https://reviews.llvm.org/D88572
More information about the llvm-commits
mailing list