[PATCH] D58364: [PowerPC] exploit P9 new instruction maddld
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 18 18:41:29 PST 2019
shchenz created this revision.
shchenz added reviewers: jsji, steven.zhang, nemanjai, hfinkel, stefanp.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
typedef long long T;
T foo(T a, T b)
{
return a*b+a;
}
on Power8 we get:
0000000000000000 <foo>:
0: f0 ff 61 f8 std r3,-16(r1)
4: e8 ff 81 f8 std r4,-24(r1)
8: f0 ff 61 e8 ld r3,-16(r1)
c: e8 ff 81 e8 ld r4,-24(r1)
10: d2 21 63 7c mulld r3,r3,r4
14: f0 ff 81 e8 ld r4,-16(r1)
18: 14 22 63 7c add r3,r3,r4
1c: 20 00 80 4e blr
On power9 we can fold `add` + `mulld` to `maddld`
https://reviews.llvm.org/D58364
Files:
llvm/lib/Target/PowerPC/P9InstrResources.td
llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/test/CodeGen/PowerPC/maddld.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58364.187289.patch
Type: text/x-patch
Size: 5460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190219/7fcc9c0a/attachment.bin>
More information about the llvm-commits
mailing list