<div class="gmail_quote">On Mon, Feb 23, 2009 at 11:13 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.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=""><br><div><div class="Ih2E3d"><div>On Feb 23, 2009, at 10:30 PM, Scott Michel wrote:</div><br><blockquote type="cite"><div class="gmail_quote">On Mon, Feb 23, 2009 at 8:26 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.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><br><div><div><div>On Feb 23, 2009, at 6:13 PM, Scott Michel wrote:</div><br><blockquote type="cite">
<div class="gmail_quote">On Mon, Feb 23, 2009 at 4:03 PM, Nate Begeman <span dir="ltr"><<a href="mailto:natebegeman@me.com" target="_blank">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><br><div><div>It's basically as  Chris said; there will be a ShuffleVectorSDNode, and appropriate helper functions, node profile, and DAGCombiner support.</div> </div></div></blockquote><div><br>Fine. For vector shuffles. But again, what about vector constants, e.g., v4i32 <0, 1, 2, 3, 4>? BuildVectorSDNode is still a reasonable subclass to have for encapsulating constant vectors (should be renamed, but hey, it's what it's called today.)</div>
 </div></blockquote><div><br></div></div><div>You're talking about two very very very different things: shuffle_vector "masks" and constant vectors.</div></div></div></blockquote><div><br>Yup. That's why I was absolutely mystified when you proposed the following:<br>
 <br>2. Move the functionality of "is splat" etc to method somewhere, e.g. on SDNode.<br> 3. Introduce a new ShuffleVectorSDNode that only has two SDValue operands (the two input vectors), but that also contains an array of ints in the node (not as operands).<br>
 4. Move the helper functions from #2 back into ShuffleVectorSDNode.<br><br>#4 is the part that completely mystifies me. I reckon that I could almost live with #2, as much I see it as being unsound software engineering and more of a performance optimization.</div>
</div></blockquote><div><br></div></div><div>I don't see how it is relevant.  The representation of constants and splat masks should be *complete different*.  If you want to see if a shuffle mask is a splat and/or if a constant vector is a splat, then you'd need different code for both.</div>
</div></div></blockquote><div><br>Because, Chris, these are your exact words -- move the constant splat code to somewhere, e.g., on SDNode then move those (constant splat code) functions to ShuffleVectorSDNode. That's how I read your steps. Hence my incredulity.<br>
<br><br>-scooter <br></div></div><br>