[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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 15:39:57 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: cameron.mcinally, pengfei, andrew.w.kaylor, uweigand, kpn, efriedma.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
craig.topper requested review of this revision.

Some of our conversion algorithms produce -0.0 when converting unsigned i64 to double. This switches them to other algorithms that don't have this problem.

There are still problems with unsigned i32 conversions too which I'll try to fix in another patch.

Fixes part of PR47393


https://reviews.llvm.org/D87115

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/SystemZ/fp-strict-conv-08.ll
  llvm/test/CodeGen/X86/fp-intrinsics.ll
  llvm/test/CodeGen/X86/fp-strict-scalar-inttofp.ll
  llvm/test/CodeGen/X86/vec-strict-inttofp-128.ll
  llvm/test/CodeGen/X86/vec-strict-inttofp-256.ll
  llvm/test/CodeGen/X86/vec-strict-inttofp-512.ll
  llvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87115.289823.patch
Type: text/x-patch
Size: 58634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200903/34b1ce0b/attachment.bin>


More information about the llvm-commits mailing list