CS153/hw6/llprograms/gep5.ll
jmug cfe502c598 Add all the assignment code.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-24 18:59:28 -08:00

10 lines
277 B
LLVM

%struct = type { i64, [5 x i64], i64 }
@gbl = global %struct { i64 1, [5 x i64] [ i64 2, i64 3, i64 4, i64 5, i64 6 ], i64 7 }
define i64 @main(i64 %argc, i8** %arcv) {
%1 = getelementptr %struct, %struct* @gbl, i32 0, i32 1, i32 2
%2 = load i64, i64* %1
ret i64 %2
}