[PATCH] D87115: [FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding to negative infinity
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 16:07:27 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2440
+ (SrcVT == MVT::i64 && DestVT == MVT::f64)) {
+ LLVM_DEBUG(dbgs() << "Converting unsigned i32/i64 to f32/f64\n");
// For unsigned conversions, convert them to signed conversions using the
----------------
What types is this correct for? I guess the integer type has to be larger than the mantissa by some number of bits, so the divide by 2 doesn't affect the rounding?
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:6469
+ if (Node->isStrictFPOpcode())
+ return false;
+
----------------
Should we drop the isStrictFPOpcode check later in the function?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87115/new/
https://reviews.llvm.org/D87115
More information about the llvm-commits
mailing list