llvm-6502/test/CodeGen/CBackend/2007-01-15-NamedArrayType.ll
Dan Gohman 193c235850 Implement CBE support for first-class structs and array values,
and insertvalue and extractvalue instructions.

First-class array values are not trivial because C doesn't
support them. The approach I took here is to wrap all arrays
in structs. Feedback is welcome.

The 2007-01-15-NamedArrayType.ll test needed to be modified
because it has a "not grep" for a string that now exists,
because array types now have associated struct types, and
those struct types have names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51881 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-02 21:30:49 +00:00

12 lines
312 B
LLVM

; PR918
; RUN: llvm-as < %s | llc -march=c | not grep {l_structtype_s l_fixarray_array3}
%structtype_s = type { i32 }
%fixarray_array3 = type [3 x %structtype_s]
define i32 @witness(%fixarray_array3* %p) {
%q = getelementptr %fixarray_array3* %p, i32 0, i32 0, i32 0
%v = load i32* %q
ret i32 %v
}