<div dir="ltr"><div>Hi Elena,</div>> <span style="font-size:13.1999998092651px;line-height:19.7999992370605px">Why NumValues should be 1? You can do the same for each value and then merge them together.<br></span><br>This isn't trivial though; we can't use a MERGE_VALUES node surely: consider:<div><br></div><div>  %1 = icmp slt, i128 %a, i128 %b</div><div>  %2 = select i1 %1, i128 %a, i128 %b</div><div><br></div><div>Assuming the i128 gets split into separate registers, we can't just do this:</div><div><br></div><div>  %1 = i64 = SMIN i64 %a:0, i64 %b:0</div><div>  %2 = i64 = SMIN i64 %a:1, i64 %b:1</div><div>  %3 = i128 = MERGE_VALUES %1, %2</div><div><br></div><div>Because the separate halves of the i128 are not safe to be operated on in isolation - each value needs to be interpreted as a i128. You can see that in "visitICmp()", multiple values aren't handled either.</div></div><br><div class="gmail_quote">On Thu, 14 May 2015 at 12:07 Elena Demikhovsky <<a href="mailto:elena.demikhovsky@intel.com">elena.demikhovsky@intel.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">REPOSITORY<br>
  rL LLVM<br>
<br>
================<br>
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2258<br>
@@ -2257,1 +2257,3 @@<br>
<br>
+  if (NumValues == 1) {<br>
+    Value *LHS, *RHS;<br>
----------------<br>
Why NumValues should be 1? You can do the same for each value and then merge them together.<br>
<br>
<br>
================<br>
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:2275<br>
@@ +2274,3 @@<br>
+<br>
+    if (Opc != ISD::DELETED_NODE &&<br>
+        DAG.getTargetLoweringInfo().isOperationLegalOrCustom(Opc, VT)) {<br>
----------------<br>
you can put the "while" (5 lines above) under this "if"<br>
<br>
<a href="http://reviews.llvm.org/D9746" target="_blank">http://reviews.llvm.org/D9746</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>