[all-commits] [llvm/llvm-project] c52ed5: [InstCombine] add FMF tests for fneg-of-select; NFC

RotateRight via All-commits all-commits at lists.llvm.org
Tue Jun 8 14:05:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c52ed5c4f1f2a2e54634226dc6bd305f98f0c541
      https://github.com/llvm/llvm-project/commit/c52ed5c4f1f2a2e54634226dc6bd305f98f0c541
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

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

  Log Message:
  -----------
  [InstCombine] add FMF tests for fneg-of-select; NFC

As noted in the post-commit comments for 3cdd05e519d,
we need to be more careful about FMF propagation.


  Commit: d2012d965d60c3258b3a69d024491698f8aec386
      https://github.com/llvm/llvm-project/commit/d2012d965d60c3258b3a69d024491698f8aec386
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-06-08 (Tue, 08 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/fneg.ll

  Log Message:
  -----------
  [InstCombine] fix nsz (fast-math) propagation from fneg-of-select

As discussed in the post-commit comments for:
3cdd05e519dd

It seems to be safe to propagate all flags from the final fneg
except for 'nsz' to the new select:
https://alive2.llvm.org/ce/z/J_APDc

nsz has unique FMF semantics: it is not poison, it is only
"insignificant" in the calculation according to the LangRef.


Compare: https://github.com/llvm/llvm-project/compare/2551053e8d8d...d2012d965d60


More information about the All-commits mailing list