<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 30, 2010, at 9:54 AM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Oct 30, 2010, at 9:27 AM, Dan Gohman wrote:<br><br><blockquote type="cite">seems pretty readable.  And it would avoid the double-dyncast issue.  But I'm not attatched.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Or if you like:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">  if (ConstantInt *CI = C->getAs<ConstantInt>())<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">clang uses some idioms like this, for example. *shrug*<br></blockquote><br>How is this different than <br><br>if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) ?<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><br></div><div>For splat vectors, it would get the splat value.</div><div><br></div><div>Unless you're suggesting making dyn_cast<ConstantInt> do that.  Which</div><div>you could, I suppose.  That'd be dancing on the edge of just letting</div><div>ConstantInt and ConstantFP have vector types.</div><div><br></div><div>Dan</div><div><br></div></body></html>