[PATCH] D108284: [DAGCombiner] Combine frem into fdiv+ftrunc+fma

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 18 03:10:57 PDT 2021


qiucf created this revision.
qiucf added reviewers: RKSimon, spatel, AMDGPU, PowerPC, foad, nemanjai, jsji.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, jvesely.
qiucf requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This helps in C library function `fmod`. `remainder` needs similar optimization, but since that's a libcall instead of a IR/DAG op, we can do it in future patches.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108284

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AMDGPU/frem.ll
  llvm/test/CodeGen/PowerPC/frem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108284.367160.patch
Type: text/x-patch
Size: 9378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210818/add59351/attachment-0001.bin>


More information about the llvm-commits mailing list