[all-commits] [llvm/llvm-project] 9e8841: [FPEnv][X86][SystemZ] Use different algorithms for...

topperc via All-commits all-commits at lists.llvm.org
Wed Oct 21 18:23:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9e884169a2723de5ad5c59af69b35b20953965fa
      https://github.com/llvm/llvm-project/commit/9e884169a2723de5ad5c59af69b35b20953965fa
  Author: Craig Topper <craig.topper at gmail.com>
  Date:   2020-10-21 (Wed, 21 Oct 2020)

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

  Log Message:
  -----------
  [FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding toward negative infinity

Some of our conversion algorithms produce -0.0 when converting unsigned i64 to double when the rounding mode is round toward negative. This switches them to other algorithms that don't have this problem. Since it is undefined behavior to change rounding mode with the non-strict nodes, this patch only changes the behavior for strict nodes.

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

Fixes part of PR47393

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87115




More information about the All-commits mailing list