[PATCH] D19775: getelementptr instruction, support index vector of EVT .

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 1 06:35:14 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL268195: getelementptr instruction, support index vector of EVT. (authored by ibreger).

Changed prior to commit:
  http://reviews.llvm.org/D19775?vs=55743&id=55744#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19775

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/trunk/test/CodeGen/X86/vector-gep.ll

Index: llvm/trunk/test/CodeGen/X86/vector-gep.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/vector-gep.ll
+++ llvm/trunk/test/CodeGen/X86/vector-gep.ll
@@ -114,3 +114,12 @@
   ret <4 x i16*> %A
 ;CHECK: ret
 }
+
+;CHECK-LABEL: AGEP9:
+define <64 x i16*> @AGEP9(i16* %param, <64 x i32> %off) nounwind {
+entry:
+;CHECK: vbroadcastss
+  %A = getelementptr i16, i16* %param, <64 x i32> %off
+  ret <64 x i16*> %A
+;CHECK: ret
+}
Index: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -3245,7 +3245,8 @@
     cast<VectorType>(I.getType())->getVectorNumElements() : 0;
 
   if (VectorWidth && !N.getValueType().isVector()) {
-    MVT VT = MVT::getVectorVT(N.getValueType().getSimpleVT(), VectorWidth);
+    LLVMContext &Context = *DAG.getContext();
+    EVT VT = EVT::getVectorVT(Context, N.getValueType(), VectorWidth);
     SmallVector<SDValue, 16> Ops(VectorWidth, N);
     N = DAG.getNode(ISD::BUILD_VECTOR, dl, VT, Ops);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19775.55744.patch
Type: text/x-patch
Size: 1194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160501/9159841a/attachment.bin>


More information about the llvm-commits mailing list