[PATCH] D76207: [PowerPC] implement target hook isProfitableToHoist

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 15 19:20:48 PDT 2020


shchenz created this revision.
shchenz added reviewers: power-llvm-team, hfinkel.
Herald added subscribers: llvm-commits, steven.zhang, wuzish, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.

On Powerpc fma is faster than fadd + fmul for some types, (PPCTargetLowering::isFMAFasterThanFMulAndFAdd). we should implement target hook `isProfitableToHoist` to prevent `simplifyCFGpass` from breaking fma pattern by hoisting fmul to predecessor block.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76207

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.h
  llvm/test/Transforms/SimplifyCFG/PowerPC/prefer-fma.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76207.250449.patch
Type: text/x-patch
Size: 5692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200316/6e950da7/attachment.bin>


More information about the llvm-commits mailing list