[all-commits] [llvm/llvm-project] b455ed: [InstCombine] Recognize copysign idioms (#101324)

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Wed Jul 31 09:14:51 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b455edbc4566dca5a367122eadd0bae9058fbd7b
      https://github.com/llvm/llvm-project/commit/b455edbc4566dca5a367122eadd0bae9058fbd7b
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow-codegen.ll
    M llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
    M llvm/test/Transforms/InstCombine/bitcast.ll

  Log Message:
  -----------
  [InstCombine] Recognize copysign idioms (#101324)

This patch folds `(bitcast (or (and (bitcast X to int), signmask), nneg
Y) to fp)` into `copysign((bitcast Y to fp), X)`. I found this pattern
exists in some graphics applications/math libraries.

Alive2: https://alive2.llvm.org/ce/z/ggQZV2



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