This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] More precise exploitation of P9 maddld instruction when operands are constant
ClosedPublic

Authored by wuzish on Apr 2 2019, 11:29 PM.

Details

Summary

There are 3 operands of maddld, (add (mul %1, %2), %3) and sometimes they are constant.
If there is constant operand, it takes extra li to materialize the operand, and one more extra register too.
So it's not profitable to use maddld to optimize mul-add pattern.

Diff Detail

Event Timeline

wuzish created this revision.Apr 2 2019, 11:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2019, 11:29 PM
jsji added a reviewer: shchenz.Apr 5 2019, 7:45 AM
shchenz accepted this revision.Apr 8 2019, 10:40 PM

LGTM except one minor formating issue. Thansk for fixing this.

llvm/test/CodeGen/PowerPC/maddld.ll
118

remove the unnescessary empty lines.

This revision is now accepted and ready to land.Apr 8 2019, 10:40 PM
wuzish marked an inline comment as done.Apr 8 2019, 11:31 PM

Address comments and make patch updated to the latest.

This revision was automatically updated to reflect the committed changes.