From c8eef440f6a71feb14085372c563cad794b25f6f Mon Sep 17 00:00:00 2001
From: Chris Lattner The first argument is always a pointer, and forms the basis of the
- calculation. The remaining arguments are indices, that indicate which of the
+ calculation. The remaining arguments are indices that indicate which of the
elements of the aggregate object are indexed. The interpretation of each
index is dependent on the type being indexed into. The first index always
indexes the pointer value given as the first argument, the second index
@@ -3929,9 +3929,10 @@ Instruction
calculation. The type of each index argument depends on the type it is indexing into.
- When indexing into a (packed) structure, only i32 integer
+ When indexing into a (optionally packed) structure, only i32 integer
constants are allowed. When indexing into an array, pointer or
- vector, integers of any width are allowed (also non-constants).Arguments:
For example, let's consider a C code fragment and how it gets compiled to LLVM: