[llvm] 0fac389 - [X86] Fix mistake in comment on LowerFROUND. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 12:22:48 PST 2022
Author: Craig Topper
Date: 2022-01-13T12:22:04-08:00
New Revision: 0fac3891ecd9761daf6f4d709bb00fcc90079f54
URL: https://github.com/llvm/llvm-project/commit/0fac3891ecd9761daf6f4d709bb00fcc90079f54
DIFF: https://github.com/llvm/llvm-project/commit/0fac3891ecd9761daf6f4d709bb00fcc90079f54.diff
LOG: [X86] Fix mistake in comment on LowerFROUND. NFC
The code uses floor not trunc.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 474ff4e8bd98d..27ce65b1ebfdb 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -22614,7 +22614,7 @@ SDValue X86TargetLowering::lowerFaddFsub(SDValue Op, SelectionDAG &DAG) const {
/// ISD::FROUND is defined to round to nearest with ties rounding away from 0.
/// This mode isn't supported in hardware on X86. But as long as we aren't
/// compiling with trapping math, we can emulate this with
-/// floor(X + copysign(nextafter(0.5, 0.0), X)).
+/// trunc(X + copysign(nextafter(0.5, 0.0), X)).
static SDValue LowerFROUND(SDValue Op, SelectionDAG &DAG) {
SDValue N0 = Op.getOperand(0);
SDLoc dl(Op);
More information about the llvm-commits
mailing list