From 0fac3891ecd9761daf6f4d709bb00fcc90079f54 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 13 Jan 2022 12:20:52 -0800 Subject: [PATCH] [X86] Fix mistake in comment on LowerFROUND. NFC The code uses floor not trunc. --- llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 474ff4e..27ce65b 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); -- 2.7.4