[all-commits] [llvm/llvm-project] 2d3593: [InstCombine] add tests for fneg-of-select with FM...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Tue Mar 15 08:05:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d3593e6683d5a7df242ac339c357ff980f201da
      https://github.com/llvm/llvm-project/commit/2d3593e6683d5a7df242ac339c357ff980f201da
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

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

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


  Commit: 598721f866156ba1259af37d9b30b1ec95983678
      https://github.com/llvm/llvm-project/commit/598721f866156ba1259af37d9b30b1ec95983678
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

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

  Log Message:
  -----------
  [InstCombine] try harder to propagate 'nsz' through fneg-of-select

This can be viewed as swapping the select arms:
https://alive2.llvm.org/ce/z/jUvFMJ
...so we don't have the 'nsz' problem with the more general fold.

This unlocks other folds for the motivating fabs example.
This was discussed in issue #38828.


Compare: https://github.com/llvm/llvm-project/compare/f6fd1c1438f0...598721f86615


More information about the All-commits mailing list