<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi Ana,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Can we generate more optimized code by using instruction <span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">DUP Hd,Vn.H[lane]</span> directly.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">With your patch we are generating two instructions like,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
<br></div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>umov<span style="white-space:pre"> </span>w0, v0.h[3]</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif"><span class="" style="white-space:pre"> </span>fmov<span class="" style="white-space:pre"> </span>s0, w0</font></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">
<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Actually they can be combined to a single "dup h0, v0.h[3]". This is what we want for this intrinsic function.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small">
<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">What you need to do is by adding one more pattern to match this case.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small">
<br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Thanks,</div><div style="font-family:arial,helvetica,sans-serif;font-size:small">-Jiangning</div><div style="font-family:arial,helvetica,sans-serif;font-size:small">
<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/4 Ana Pazos <span dir="ltr"><<a href="mailto:apazos@codeaurora.org" target="_blank">apazos@codeaurora.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Hi Tim and reviewers,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I followed Tim’s suggestion to use macros to handle the float16_t storage type.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Notes:<u></u><u></u></p><p><u></u><span>1)<span style="font:7.0pt "Times New Roman""> </span></span><u></u>Since the vget/vset_lane_f16 intrinsics read and write 16 bit data (no FP arithmetic performed), I simply reinterpreted float16_t and the vector of float16_t as i16 data.<u></u><u></u></p>
<p>See the operators defined in NeonEmitter.<u></u><u></u></p><p><u></u><span>2)<span style="font:7.0pt "Times New Roman""> </span></span><u></u>With this change vget/vset_lane_f16 use to vget/vset_lane_i16 implementation.<u></u><u></u></p>
<p><u></u><span>3)<span style="font:7.0pt "Times New Roman""> </span></span><u></u>I added f16_to_f32 pattern because in the vset_lane case the i16 data is moved from GPR to a FP register, and hence the need for this pattern.<u></u><u></u></p>
<p><u></u><span>4)<span style="font:7.0pt "Times New Roman""> </span></span><u></u>I added test cases that define float16_t variable in the function body, but do not return such value type as it is not allowed. Let me know if these tests are satisfactory.<u></u><u></u></p>
<p><u></u><span>5)<span style="font:7.0pt "Times New Roman""> </span></span><u></u>I did not try to enforce the recommended intrinsic->instruction map from the ARM document. <u></u><u></u></p><p>To force those instructions I would have to use builtins and v1i16 type casts so I can create the pattern.<u></u><u></u></p>
<p>Even doing that, in some cases the UMOV, INS patterns defined earlier can prevail over.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Ana.<u></u><u></u></p>
</div></div><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font face="courier new, monospace">Thanks,</font><div><font face="courier new, monospace">-Jiangning</font></div></div>
</div>