<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<br>
<div>
<div>On Mar 12, 2013, at 9:30 AM, Nadav Rotem <<a href="mailto:nrotem@apple.com">nrotem@apple.com</a>></div>
<div> 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-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Richard, 
<div><br>
</div>
<div>The assertion that you suggested that we remove is about something different. It checks that the result of the select node is legalized before the condition.  Can you show us the SDNode that fails on this assertion ?  </div>
</div>
</blockquote>
<div><br>
</div>
<div>Not at the moment… ;-) With your fix to visitSIGN_EXTEND, this problem seems to have disappeared...</div>
<br>
<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-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div> </div>
<div>Thanks,</div>
<div>Nadav </div>
<div><br>
<div>
<div>On Mar 12, 2013, at 9:25 AM, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</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-size-adjust: auto; -webkit-text-stroke-width: 0px;">
Hi Richard,<br>
<br>
On 12/03/13 16:00, Relph, Richard wrote:<br>
<blockquote type="cite">DAGTypeLegalizer::SplitRes_SELECT() currently does an assert if the condition is not of type MVT::i1. This patch uses the existing type of the condition to generate the type for the split conditions instead of a fixed i1.<br>
This is an issue for us when trying to legalize a 8x or 16x vector to a 4x type… it isn't the case that we always have an MVT::i1 condition coming in.<br>
</blockquote>
<br>
if the select condition is a vector then you should be using a vselect node<br>
rather than a select node.  So I think this patch is wrong and the real problem<br>
is that the wrong select node type is being generated somewhere.<br>
<br>
Ciao, Duncan.<br>
<br>
<blockquote type="cite"><br>
Index: lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp<br>
===================================================================<br>
--- lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp<span class="Apple-tab-span" style="white-space: pre;">
</span>(revision 176837)<br>
+++ lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp<span class="Apple-tab-span" style="white-space: pre;">
</span>(working copy)<br>
@@ -490,10 +490,10 @@<br>
   SDValue Cond = N->getOperand(0);<br>
   CL = CH = Cond;<br>
   if (Cond.getValueType().isVector()) {<br>
-    assert(Cond.getValueType().getVectorElementType() == MVT::i1 &&<br>
-           "Condition legalized before result?");<br>
     unsigned NumElements = Cond.getValueType().getVectorNumElements();<br>
-    EVT VCondTy = EVT::getVectorVT(*DAG.getContext(), MVT::i1, NumElements / 2);<br>
+    EVT VCondTy = EVT::getVectorVT(*DAG.getContext(),<br>
+                                   Cond.getValueType().getVectorElementType(),<br>
+                                   NumElements / 2);<br>
     CL = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, VCondTy, Cond,<br>
                      DAG.getIntPtrConstant(0));<br>
     CH = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, VCondTy, Cond,<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</body>
</html>