<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I prefer not to drill down into the design of the vectorizer yet, but I think that a cannonicalization phase before the vectorization can handle these cases. </div><br><div><div>On Oct 5, 2012, at 10:33 AM, Shuxin Yang <<a href="mailto:shuxin.llvm@gmail.com">shuxin.llvm@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">>I think that the first step would
be to expose Target Lowering Interface (TLI) to OPT's IR-level
passes.
<br>
<br>
By "lowering", we assume the bitcode is more abstract than the
machine code. However, in some situations, it is just opposite.
For instance, some architectures support vectorization of
min/max/saturated-{add,sub)<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>conditional-assignment/etc<span class="moz-txt-tag">/</span></i>../etc. We need to detect such
machine dependent patterns, and <b class="moz-txt-star"><span class="moz-txt-tag">*</span>PROMOTE<span class="moz-txt-tag">*</span></b>
the bitcode into right forms before we are able to vectorize them.
How to deal with this situation?
<br>
<br>
Shuxin
<br>
<br>
</div>
</div>
</blockquote></div><br></body></html>