[all-commits] [llvm/llvm-project] bcf5e6: [InstCombine] add tests for fadd+fmul factorizatio...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Mon Jan 17 08:00:07 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bcf5e687c917ed35c41395b92a5af8f162f89efc
      https://github.com/llvm/llvm-project/commit/bcf5e687c917ed35c41395b92a5af8f162f89efc
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-01-17 (Mon, 17 Jan 2022)

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

  Log Message:
  -----------
  [InstCombine] add tests for fadd+fmul factorization fold; NFC

As shown in the tests, this transform exists partially already.


  Commit: 4cdf30d9d36ea6a6dfee967414f9f0e1748350af
      https://github.com/llvm/llvm-project/commit/4cdf30d9d36ea6a6dfee967414f9f0e1748350af
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-01-17 (Mon, 17 Jan 2022)

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

  Log Message:
  -----------
  [InstCombine] FP with reassoc FMF: (X * C) + X --> X * (MulC + 1.0)

This fold already exists for scalars via FAddCombine (and that's
why 2 of the tests are only changed cosmetically), but that code
misses vectors and has largely been replaced by simpler folds
over time, so this is another step towards removing it.


Compare: https://github.com/llvm/llvm-project/compare/3130134d6e48...4cdf30d9d36e


More information about the All-commits mailing list