[llvm-commits] [PATCH] Vector-select patch

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Mon Jul 25 10:55:41 PDT 2011


Hi Nadav,

> Please review the attached file. The type legalization changes are mostly
> complete, and it is possible to match vector instructions.  This patch
> contains the code-independent parts of the vector select.

MVT::SimpleValueType X86TargetLowering::getSetCCResultType(EVT VT) const {
-  return MVT::i8;
+  if (!VT.isVector()) return MVT::i8;
+  switch (VT.getVectorNumElements()) {
+    default:
+      assert(false &&  "unknown vector size");
+    case 2: return MVT::v2i64;
+    case 4: return MVT::v4i32;
+    case 8: return MVT::v8i16;
+    case 16: return MVT::v16i8;
+  }
 }

Could you please add the 256-bit AVX types here?

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc




More information about the llvm-commits mailing list