<div class="gmail_quote">On Mon, Feb 23, 2009 at 4:03 PM, Nate Begeman <span dir="ltr"><<a href="mailto:natebegeman@me.com">natebegeman@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div><div class="Ih2E3d"><blockquote type="cite"><div class="gmail_quote"><div>I like the idea of a ShuffleVectorSDNode (moves things in the direction of a bijective ISD to SDNode mapping), but eliminating BuildVectorSDNode in its entirety doesn't deal with constant and variable vectors.<br>
</div></div></blockquote><div><br></div></div><div>LLVM has no variable shuffle instruction, so there's no variable vectors to deal with; moving the constants into the shuffle sdnode does address constant shuffles (which are all of them).  Variable shuffles would need to be represented as target nodes at present, and my work will not change that.</div>
</div></div></blockquote><div><br>I think what you meant to say here is that LLVM doesn't deal with variable-length vectors and it does not deal with non-constant masks. That's not the same what I was proposing, which is (now) an argument for O-O hygiene and creating constant vectors.<br>
<br>Somehow I managed to get the impression that Chris was proposing moving constant vector formation, e.g., v4i32 <0, 1, 2, 3, 4>, into the ShuffleVectorSDNode class. That seems really odd, but that's how I read his four steps. Happy to be proven that this was a misperception.<br>
<br>It's really in constant vector formation that isConstantSplat() is actually useful. I'm not sure how useful isContantSplat() will be when moved to a shuffle vector SDNode class.<br><br><br>-scooter<br></div></div>
<br>