[all-commits] [llvm/llvm-project] b590e0: [TargetLowering][ARM][X86] Change softenSetCCOpera...
topperc via All-commits
all-commits at lists.llvm.org
Fri Jan 10 11:00:41 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b590e0fd810e4caf59ab83b04654d42e18faaafb
https://github.com/llvm/llvm-project/commit/b590e0fd810e4caf59ab83b04654d42e18faaafb
Author: Craig Topper <craig.topper at intel.com>
Date: 2020-01-10 (Fri, 10 Jan 2020)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/test/CodeGen/Thumb2/float-cmp.ll
M llvm/test/CodeGen/X86/fp128-compare.ll
M llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
M llvm/test/CodeGen/X86/fpcmp-soft-fp.ll
Log Message:
-----------
[TargetLowering][ARM][X86] Change softenSetCCOperands handling of ONE to avoid spurious exceptions for QNANs with strict FP quiet compares
ONE is currently softened to OGT | OLT. But the libcalls for OGT and OLT libcalls will trigger an exception for QNAN. At least for X86 with libgcc. UEQ on the other hand uses UO | OEQ. The UO and OEQ libcalls will not trigger an exception for QNAN.
This patch changes ONE to use the inverse of the UEQ lowering. So we now produce O & UNE. Technically the existing behavior was correct for a signalling ONE, but since I don't know how to generate one of those from clang that seemed like something we can deal with later as we would need to fix other predicates as well. Also removing spurious exceptions seemed better than missing an exception.
There are also problems with quiet OGT/OLT/OLE/OGE, but those are harder to fix.
Differential Revision: https://reviews.llvm.org/D72477
More information about the All-commits
mailing list