<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:59 AM, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</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;">
Hi Richard,<br>
<br>
On 12/03/13 17:55, Relph, Richard wrote:<br>
<blockquote type="cite"><br>
On Mar 12, 2013, at 9:30 AM, Nadav Rotem <<a href="mailto:nrotem@apple.com">nrotem@apple.com</a><br>
<<a href="mailto:nrotem@apple.com">mailto:nrotem@apple.com</a>>><br>
 wrote:<br>
<br>
<blockquote type="cite">Richard,<br>
<br>
The assertion that you suggested that we remove is about something different.<br>
It checks that the result of the select node is legalized before the<br>
condition.  Can you show us the SDNode that fails on this assertion ?<br>
</blockquote>
<br>
Not at the moment… ;-) With your fix to visitSIGN_EXTEND, this problem seems to<br>
have disappeared...<br>
</blockquote>
<br>
in that case can you please revert this patch if you applied it.<br>
</div>
</blockquote>
<div><br>
</div>
It wasn't applied… I'm in "submit after approval" mode. ;-)</div>
<div><br>
</div>
<div>I have discovered that SplitRes_SELECT is called for both SELECT and VSELECT from SplitVectorResult() in LegalizeVectorTypes.cpp. That's why SplitRes_SELECT has code to deal with vector conditions...</div>
<div><br>
</div>
<div>
<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;">
<br>
Thanks, Duncan.<br>
<br>
<blockquote type="cite"><br>
<blockquote type="cite">Thanks,<br>
Nadav<br>
<br>
On Mar 12, 2013, at 9:25 AM, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</a><br>
<<a href="mailto:baldrick@free.fr">mailto:baldrick@free.fr</a>>> wrote:<br>
<br>
<blockquote type="cite">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<br>
condition is not of type MVT::i1. This patch uses the existing type of the<br>
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<br>
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(revision 176837)<br>
+++ lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp(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<br>
/ 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><span class="Apple-converted-space"> </span><<a href="mailto:llvm-commits@cs.uiuc.edu">mailto: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>
</blockquote>
</blockquote>
</blockquote>
</div>
</blockquote>
</div>
<br>
</body>
</html>