<div dir="ltr">The result in the example I made doesn't need to be exactly like that; that is I want to recognize the inner loop and translate it into a machine instruction. I thought that translating it into an intrinsic could be easier but it seems not.<br>What I was thinking to do is to modify the Mips backend adding a Loop Pass or a Function Pass. Do you think that this could work?</div><div class="gmail_extra"><br><div class="gmail_quote">2017-01-14 23:57 GMT+01:00 Krzysztof Parzyszek via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 1/13/2017 7:08 PM, Hal Finkel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is integer multiplication or floating-point multiplication? If it<br>
is integer multiplication, I'd expect that using SCEV would be the<br>
easiest way to recognize the relevant patterns. SCEV is supposed to<br>
understand all of the unobfuscation tricks.<br>
<br>
Do these instructions contain an implicit loop (of runtime trip count)<br>
or are you trying to match loops of some fixed trip count?<br>
</blockquote>
<br></span>
It's binary polynomial multiplication. The loops are usually with a compile-time constant iteration count.<br>
<br>
I posted a specific patch with that code:<br>
<a href="https://reviews.llvm.org/D28694" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2869<wbr>4</a><span class="HOEnZb"><font color="#888888"><br>
<br>
-Krzysztof</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div>