Relax the restrictions on vector of pointer types, and vector getelementptr.
authorDuncan Sands <baldrick@free.fr>
Tue, 13 Nov 2012 12:59:33 +0000 (12:59 +0000)
committerDuncan Sands <baldrick@free.fr>
Tue, 13 Nov 2012 12:59:33 +0000 (12:59 +0000)
commit2333e29be441d9d55920651e0b2add23ab0c1613
treea81026fd460acee57a8305816fea3c2a75879aee
parent563e8fce2ee22b21beb40ac65a6eaf2199d30414
Relax the restrictions on vector of pointer types, and vector getelementptr.
Previously in a vector of pointers, the pointer couldn't be any pointer type,
it had to be a pointer to an integer or floating point type.  This is a hassle
for dragonegg because the GCC vectorizer happily produces vectors of pointers
where the pointer is a pointer to a struct or whatever.  Vector getelementptr
was restricted to just one index, but now that vectors of pointers can have
any pointer type it is more natural to allow arbitrary vector getelementptrs.
There is however the issue of struct GEPs, where if each lane chose different
struct fields then from that point on each lane will be working down into
unrelated types.  This seems like too much pain for too little gain, so when
you have a vector struct index all the elements are required to be the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167828 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
docs/LangRef.html
include/llvm/Constant.h
lib/AsmParser/LLParser.cpp
lib/Bitcode/Writer/ValueEnumerator.cpp
lib/VMCore/Constants.cpp
lib/VMCore/Instructions.cpp
lib/VMCore/Type.cpp
lib/VMCore/Verifier.cpp
test/Assembler/getelementptr.ll
test/Assembler/getelementptr_vec_idx1.ll [new file with mode: 0644]
test/Assembler/getelementptr_vec_idx2.ll [new file with mode: 0644]
test/Assembler/getelementptr_vec_idx3.ll [new file with mode: 0644]
test/Assembler/getelementptr_vec_struct.ll [new file with mode: 0644]
test/Transforms/LoopVectorize/gcc-examples.ll