[X86] Fix mistake in comment on LowerFROUND. NFC
authorCraig Topper <craig.topper@sifive.com>
Thu, 13 Jan 2022 20:20:52 +0000 (12:20 -0800)
committerCraig Topper <craig.topper@sifive.com>
Thu, 13 Jan 2022 20:22:04 +0000 (12:22 -0800)
The code uses floor not trunc.

llvm/lib/Target/X86/X86ISelLowering.cpp

index 474ff4e..27ce65b 100644 (file)
@@ -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);