<div dir="ltr"><div>Why do you need to know the original basic-block? Surely if you are replacing vector of 8*float with 4*float, all you need to do is double up the actual operations? Anything else is unlikely to work in ALL cases, since the outer code may do non-obvious things based on having [for example] 8 elements per vector - it may have unrolled all or part of a loop, just to give a single example. [And watch for conversions from 8*float to 8*int and similar operations, that later lead to a conditional statement - this could get quite a challenge in the "unvectorize" case, as you need to understand how to split the conditions apart and maintain the same functionality.<br><br></div><div>I personally would have thought it easier to only let the vectorizer generate 4*float IR in the first place.... :)<br></div><div><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 August 2017 at 17:01, Yihan Pang via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
Is there an easy way to detect whether auto vectorization had happened<br>
in the IR level. Currently, I am trying to modify SIMD width at IR<br>
level (changing from <8 *float > to <4 *float> etc). However, I am<br>
having hard time to detect the exact basic block that is used for<br>
vector.body. For now I am using more a worse method that detecting<br>
instruction pattern that existed in the vector.body of my IR which i<br>
am certain will not be able to apply to broader cases.<br>
<br>
<br>
Best,<br>
Yihan<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">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>
</blockquote></div><br></div>