[all-commits] [llvm/llvm-project] 2bfa7d: [InstCombine] Fold `fmul X, -0.0` into `copysign(0...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Thu Mar 21 06:48:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bfa7d0e1691dcff095c602a0387a6d13213dc91
      https://github.com/llvm/llvm-project/commit/2bfa7d0e1691dcff095c602a0387a6d13213dc91
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/binop-itofp.ll
    M llvm/test/Transforms/InstCombine/fmul.ll
    M llvm/test/Transforms/InstCombine/fpcast.ll

  Log Message:
  -----------
  [InstCombine] Fold `fmul X, -0.0` into `copysign(0.0, -X)` (#85772)

`fneg + copysign` is better than fmul for analysis/codegen.
godbolt: https://godbolt.org/z/eEs6dGd1G
Alive2: https://alive2.llvm.org/ce/z/K3M5BA



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list