[all-commits] [llvm/llvm-project] 4a4e44: [InstCombine] add test for loop-invariant fdiv; NFC

Sanjay Patel via All-commits all-commits at lists.llvm.org
Tue Feb 14 14:51:21 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a4e44e378ca4a9b0b82c208bc324b50fef5676e
      https://github.com/llvm/llvm-project/commit/4a4e44e378ca4a9b0b82c208bc324b50fef5676e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    M llvm/test/Transforms/InstCombine/fmul.ll

  Log Message:
  -----------
  [InstCombine] add test for loop-invariant fdiv; NFC

Adding baseline test based on D87479, so we know
current state and limitations of a potential fix.


  Commit: 83ba349ae0a853e0c2cd8e8aadc88993e9fb9a19
      https://github.com/llvm/llvm-project/commit/83ba349ae0a853e0c2cd8e8aadc88993e9fb9a19
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    M llvm/include/llvm/ADT/APFloat.h
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
    M llvm/test/Transforms/InstSimplify/fp-nan.ll
    M llvm/test/Transforms/InstSimplify/strictfp-fadd.ll

  Log Message:
  -----------
  [InstSimplify] fix/improve folding with an SNaN operand

There are 2 issues here:

1. In the default LLVM FP environment (regular FP math instructions),
   SNaN is some flavor of "don't care" which we will nail down in
   D143074, so this is just a quality-of-implementation improvement
   for default FP.
2. In the constrained FP environment (constrained intrinsics), SNaN
   must not propagate through a math operation; it has to be quieted
   according to IEEE-754 spec. That is independent of exception
   handling mode, so the current behavior is a miscompile.

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


Compare: https://github.com/llvm/llvm-project/compare/1ce1e4a4d59d...83ba349ae0a8


More information about the All-commits mailing list