PowerPC has instruction to do the semantics of this piece of code:
vector int foo(vector int m, vector int n) { return (m + n + 1) >> 1; }
This patch is adding the match rule to select it.
Paths
| Differential D71002
[PowerPC] Exploitate the Vector Integer Average Instructions ClosedPublic Authored by steven.zhang on Dec 4 2019, 2:35 AM.
Details
Summary PowerPC has instruction to do the semantics of this piece of code: vector int foo(vector int m, vector int n) { return (m + n + 1) >> 1; } This patch is adding the match rule to select it.
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Dec 9 2019, 10:48 PM Closed by commit rGf99297176cd9: [PowerPC] Exploitate the Vector Integer Average Instructions (authored by steven.zhang). · Explain WhyDec 10 2019, 11:28 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 233261 llvm/lib/Target/PowerPC/PPCInstrAltivec.td
llvm/test/CodeGen/PowerPC/vavg.ll
|
nit: We'd better place pattern and result in different lines considering there might be many brackets.