[PATCH] D142178: [X86] Change precision control to FP80 during u64->fp32 conversion on Windows.
icedrocket via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 4 04:04:56 PST 2023
icedrocket added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:22045
+ // Windows needs the precision control changed to 80bits around this add.
+ if (Subtarget.isOSWindows() && DstVT == MVT::f32)
+ Opc = X86ISD::FP80_ADD;
----------------
icedrocket wrote:
> Should we only apply this to the conversion to f32? Conversion to f64 might also have precision issues though I can't prove it.
LowerUINT_TO_FP_i64 also uses FP64 addition. If u64 to f64 conversion is problematic because FP80 addition is not used, then implementations using SSE2 will also be problematic. So unless we find a broken case, I think it's better to leave it alone.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142178/new/
https://reviews.llvm.org/D142178
More information about the llvm-commits
mailing list