[all-commits] [llvm/llvm-project] 7b7940: [InstSimplify] reduce code duplication for fmul fo...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Mon Oct 3 07:37:06 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b7940f9da80de6aa0b8f28a0ef809dafe4cdffc
      https://github.com/llvm/llvm-project/commit/7b7940f9da80de6aa0b8f28a0ef809dafe4cdffc
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-10-03 (Mon, 03 Oct 2022)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll

  Log Message:
  -----------
  [InstSimplify] reduce code duplication for fmul folds; NFC

The constant is already commuted for an fmul opcode,
but this code can be called more directly for fma,
so we have to swap for that caller. There are tests
in InstSimplify and InstCombine to verify that this
works as expected.




More information about the All-commits mailing list