<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>No need for the braces :)  </div><div><br></div><div>I will commit this for you. </div><div><br></div><br><div><div>On May 7, 2013, at 1:02 PM, Matt Arsenault <<a href="mailto:Matthew.Arsenault@amd.com">Matthew.Arsenault@amd.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> Update comment<br><br>Hi nadav,<br><br><a href="http://llvm-reviews.chandlerc.com/D743">http://llvm-reviews.chandlerc.com/D743</a><br><br>CHANGE SINCE LAST DIFF<br> <a href="http://llvm-reviews.chandlerc.com/D743?vs=1869&id=1870#toc">http://llvm-reviews.chandlerc.com/D743?vs=1869&id=1870#toc</a><br><br>Files:<br> lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp<br><br>Index: lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp<br>===================================================================<br>--- lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp<br>+++ lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp<br>@@ -652,13 +652,14 @@<br>SDValue VectorLegalizer::ExpandVSELECT(SDValue Op) {<br>  // Implement VSELECT in terms of XOR, AND, OR<br>  // on platforms which do not support blend natively.<br>-  EVT VT =  Op.getOperand(0).getValueType();<br>  DebugLoc DL = Op.getDebugLoc();<br><br>  SDValue Mask = Op.getOperand(0);<br>  SDValue Op1 = Op.getOperand(1);<br>  SDValue Op2 = Op.getOperand(2);<br><br>+  EVT VT = Mask.getValueType();<br>+<br>  // If we can't even use the basic vector operations of<br>  // AND,OR,XOR, we will have to scalarize the op.<br>  // Notice that the operation may be 'promoted' which means that it is<br>@@ -673,8 +674,13 @@<br>      TargetLowering::ZeroOrNegativeOneBooleanContent)<br>    return DAG.UnrollVectorOp(Op.getNode());<br><br>-  assert(VT.getSizeInBits() == Op1.getValueType().getSizeInBits()<br>-         && "Invalid mask size");<br>+  // If the mask and the type are different sizes, unroll the vector op. This<br>+  // can occur when getSetCCResultType returns something that is different in<br>+  // size from the operand types. For example, v4i8 = select v4i32, v4i8, v4i8.<br>+  if (VT.getSizeInBits() != Op1.getValueType().getSizeInBits()) {<br>+    return DAG.UnrollVectorOp(Op.getNode());<br>+  }<br>+<br>  // Bitcast the operands to be the same type as the mask.<br>  // This is needed when we select between FP types because<br>  // the mask is a vector of integers.<br><span><D743.4.patch></span></div></blockquote></div><br></body></html>