[PATCH] D87115: [FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding toward negative infinity
    Eli Friedman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct 12 12:30:19 PDT 2020
    
    
  
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM with one minor comment.
================
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
----------------
efriedma wrote:
> 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?
I'd like to see a comment briefly describing the widths where this works.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87115/new/
https://reviews.llvm.org/D87115
    
    
More information about the llvm-commits
mailing list