<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Tim,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
I made changes following your comments and committed as r194649.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">
Thanks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">-Jiangning</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/14 Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  Hi Jiangning,<br>
<br>
  I think this is correct now, so it's mostly nits. That switch feels like it could be simplified significantly, but we can probably postpone that for now.<br>
<br>
  Cheers.<br>
<br>
  Tim.<br>
<br>
<br>
================<br>
Comment at: lib/CodeGen/CGBuiltin.cpp:2465<br>
@@ -2464,3 +2464,3 @@<br>
<br>
-Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,<br>
-                                                     const CallExpr *E) {<br>
+static Value *packDVectorList(CodeGenFunction &CGF, ArrayRef<Value *> Ops,<br>
+                              Value *ExtOp, Value *IndexOp, llvm::Type *ResTy,<br>
----------------<br>
This function now seems to be completely TBL orientated. Its name should probably reflect that.<br>
<br>
================<br>
Comment at: lib/CodeGen/CGBuiltin.cpp:2488-2491<br>
@@ +2487,6 @@<br>
+<br>
+  // If there's an odd number of registers, the high half of the final Q is<br>
+  // undef.<br>
+  if (PairPos == End) {<br>
+    Value *ZeroTbl = ConstantAggregateZero::get(TblTy);<br>
+    TblOps.push_back(CGF.Builder.CreateShuffleVector(Ops[PairPos],<br>
----------------<br>
Comment doesn't match code.<br>
<br>
================<br>
Comment at: test/CodeGen/aarch64-neon-tbl.c:84-85<br>
@@ +83,4 @@<br>
+  return vtbx1_s8(a, b, c);<br>
+  // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b<br>
+  // CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b<br>
+}<br>
----------------<br>
I think more should be tested in the AArch32 emulation cases. It's important that the high half is 0 for vtbl and that an appropriate comparison takes place for vtbx.<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D2070" target="_blank">http://llvm-reviews.chandlerc.com/D2070</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font face="courier new, monospace">Thanks,</font><div><font face="courier new, monospace">-Jiangning</font></div></div>
</div>