llvm/test/Assembler/getelementptr_vec_ce.ll
Michael Kuperstein f4bf651085 [LLParser] Parse vector GEP constant expression correctly
The constantexpr parsing was too constrained and rejected legal vector GEPs.
This relaxes it to be similar to the ones for instruction parsing.

This fixes PR30816.

Differential Revision: https://reviews.llvm.org/D28013


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 18:29:47 +00:00

10 lines
372 B
LLVM

; RUN: llvm-as < %s | llvm-dis | FileCheck %s
@G = global [4 x i32] zeroinitializer
; CHECK-LABEL: @foo
; CHECK: ret <4 x i32*> getelementptr ([4 x i32], [4 x i32]* @G, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>)
define <4 x i32*> @foo() {
ret <4 x i32*> getelementptr ([4 x i32], [4 x i32]* @G, i32 0, <4 x i32> <i32 0, i32 1, i32 2, i32 3>)
}