[PATCH] D78271: [TLI][PowerPC] Introduce TLI query to check if MULH is cheaper than MUL + SHIFT
Amy Kwan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 22:01:37 PDT 2020
amyk created this revision.
amyk added reviewers: PowerPC, power-llvm-team, nemanjai, stefanp.
Herald added subscribers: llvm-commits, steven.zhang, shchenz, kbarton, hiraditya.
Herald added a project: LLVM.
amyk edited the summary of this revision.
Herald added a subscriber: wuzish.
This patch introduces a TargetLowering query, `isMulhCheaperThanMulShift`.
Currently in DAG Combine, it will transform mulhs/mulhu into a
wider multiply and a shift if the wide multiply is legal.
This TLI function is implemented on 64-bit PowerPC, as it is more desirable to
have multiply-high over multiply + shift for words and doublewords. Having
multiply-high can also aid in further transformations that can be done.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78271
Files:
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/test/CodeGen/PowerPC/loop-instr-form-prepare.ll
llvm/test/CodeGen/PowerPC/machine-pre.ll
llvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll
llvm/test/CodeGen/PowerPC/srem-vector-lkk.ll
llvm/test/CodeGen/PowerPC/urem-vector-lkk.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78271.257947.patch
Type: text/x-patch
Size: 94436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/f21a7153/attachment.bin>
More information about the llvm-commits
mailing list