[all-commits] [llvm/llvm-project] 568380: [InstCombine] add tests for reassociative fadd wit...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Thu Aug 11 09:03:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5683801c561a5032f5eef2b3c90e551ad9a85d3e
      https://github.com/llvm/llvm-project/commit/5683801c561a5032f5eef2b3c90e551ad9a85d3e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

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

  Log Message:
  -----------
  [InstCombine] add tests for reassociative fadd with negated op; NFC

Extra uses inhibit more basic folds, so we miss the larger fold.


  Commit: fa68d93d54b0cc8f8ecb550641236955d38ae9c1
      https://github.com/llvm/llvm-project/commit/fa68d93d54b0cc8f8ecb550641236955d38ae9c1
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

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

  Log Message:
  -----------
  [InstCombine] fold reassociative fadd with negated operand

We manage to iteratively achieve this result with no extra
uses, and the reassociate pass can also do this, but this
pattern falls through the cracks in the example from
issue #57053.


Compare: https://github.com/llvm/llvm-project/compare/0e54d9dfdce3...fa68d93d54b0


More information about the All-commits mailing list