aboutsummaryrefslogtreecommitdiffstats
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-24 02:37:54 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-24 02:37:54 +0000
commit7787d4a34b8db6dec10142ef8d85f28f881897cf (patch)
tree132bd2093c206fa866bd472837015d5b6610ea6c /docs/LangRef.html
parentad62f53795ac3da0353afba7e83464679c91ce5c (diff)
downloadexternal_llvm-7787d4a34b8db6dec10142ef8d85f28f881897cf.zip
external_llvm-7787d4a34b8db6dec10142ef8d85f28f881897cf.tar.gz
external_llvm-7787d4a34b8db6dec10142ef8d85f28f881897cf.tar.bz2
Allow i16 type indices to gep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 8ec1123..587f981 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -3629,7 +3629,8 @@ the pointer before continuing calculation.</p>
<p>The type of each index argument depends on the type it is indexing into.
When indexing into a (packed) structure, only <tt>i32</tt> integer
<b>constants</b> are allowed. When indexing into an array, pointer or vector,
-only integers of 32 or 64 bits are allowed (also non-constants). 32-bit values
+only integers of 16, 32 or 64 bits are allowed (also non-constants).16-bit
+values will be sign extended to 32-bits if required, and 32-bit values
will be sign extended to 64-bits if required.</p>
<p>For example, let's consider a C code fragment and how it gets
@@ -3717,6 +3718,8 @@ FAQ</a>.</p>
%vptr = getelementptr {i32, &lt;2 x i8&gt;}* %svptr, i64 0, i32 1, i32 1
<i>; yields i8*:eptr</i>
%eptr = getelementptr [12 x i8]* %aptr, i64 0, i32 1
+ <i>; yields i16*:iptr</i>
+ %iptr = getelementptr [10 x i16]* @arr, i16 0, i16 0
</pre>
</div>