diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-01-16 21:12:35 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-01-16 21:12:35 +0000 |
commit | 0b118206bf3411722707f2e5cab8fd2eedcd50d6 (patch) | |
tree | 1a222f39010130f9e1a5a30f5937bf323b7265eb /docs/LangRef.html | |
parent | e86bf519e1ea57a84d37422ec364f89c322e3ef4 (diff) | |
download | external_llvm-0b118206bf3411722707f2e5cab8fd2eedcd50d6.zip external_llvm-0b118206bf3411722707f2e5cab8fd2eedcd50d6.tar.gz external_llvm-0b118206bf3411722707f2e5cab8fd2eedcd50d6.tar.bz2 |
For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r-- | docs/LangRef.html | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index c92e7ea..95ac99b 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -3394,20 +3394,21 @@ this can be specified as the fourth argument, otherwise it should be set to 0 or <!-- _______________________________________________________________________ --> <div class="doc_subsubsection"> - <a name="i_isunordered">'<tt>llvm.isunordered</tt>' Intrinsic</a> + <a name="i_isunordered">'<tt>llvm.isunordered.*</tt>' Intrinsic</a> </div> <div class="doc_text"> <h5>Syntax:</h5> <pre> - declare bool %llvm.isunordered(<float or double> Val1, <float or double> Val2) + declare bool %llvm.isunordered.f32(float Val1, float Val2) + declare bool %llvm.isunordered.f64(double Val1, double Val2) </pre> <h5>Overview:</h5> <p> -The '<tt>llvm.isunordered</tt>' intrinsic returns true if either or both of the +The '<tt>llvm.isunordered</tt>' intrinsics return true if either or both of the specified floating point values is a NAN. </p> @@ -3435,13 +3436,14 @@ false. <h5>Syntax:</h5> <pre> - declare <float or double> %llvm.sqrt(<float or double> Val) + declare double %llvm.sqrt.f32(float Val) + declare double %llvm.sqrt.f64(double Val) </pre> <h5>Overview:</h5> <p> -The '<tt>llvm.sqrt</tt>' intrinsic returns the sqrt of the specified operand, +The '<tt>llvm.sqrt</tt>' intrinsics return the sqrt of the specified operand, returning the same value as the libm '<tt>sqrt</tt>' function would. Unlike <tt>sqrt</tt> in libm, however, <tt>llvm.sqrt</tt> has undefined behavior for negative numbers (which allows for better optimization). @@ -3483,6 +3485,7 @@ These allow efficient code generation for some algorithms. <h5>Syntax:</h5> <pre> + declare ushort %llvm.bswap.i8( ubyte <id> ) declare ushort %llvm.bswap.i16( ushort <id> ) declare uint %llvm.bswap.i32( uint <id> ) declare ulong %llvm.bswap.i64( ulong <id> ) @@ -3511,20 +3514,24 @@ to 64 bits. <!-- _______________________________________________________________________ --> <div class="doc_subsubsection"> - <a name="int_ctpop">'<tt>llvm.ctpop</tt>' Intrinsic</a> + <a name="int_ctpop">'<tt>llvm.ctpop.*</tt>' Intrinsic</a> </div> <div class="doc_text"> <h5>Syntax:</h5> <pre> - declare int %llvm.ctpop(int <src>) + declare sbyte %llvm.ctpop.i8(sbyte <src>) + declare short %llvm.ctpop.i16(short <src>) + declare int %llvm.ctpop.i32(int <src>) + declare long %llvm.ctpop.i64(long <src>) </pre> <h5>Overview:</h5> <p> -The '<tt>llvm.ctpop</tt>' intrinsic counts the number of ones in a variable. +The '<tt>llvm.ctpop</tt>' family of intrinsics counts the number of ones in a +variable. </p> <h5>Arguments:</h5> @@ -3550,15 +3557,17 @@ The '<tt>llvm.ctpop</tt>' intrinsic counts the 1's in a variable. <h5>Syntax:</h5> <pre> - declare int %llvm.ctlz(int <src>) - + declare sbyte %llvm.ctlz.i8(sbyte <src>) + declare short %llvm.ctlz.i16(short <src>) + declare int %llvm.ctlz.i32(int <src>) + declare long %llvm.ctlz.i64(long <src>) </pre> <h5>Overview:</h5> <p> -The '<tt>llvm.ctlz</tt>' intrinsic counts the number of leading zeros in a -variable. +The '<tt>llvm.ctlz</tt>' family of intrinsic functions counts the number of +leading zeros in a variable. </p> <h5>Arguments:</h5> @@ -3588,13 +3597,17 @@ of src. For example, <tt>llvm.cttz(int 2) = 30</tt>. <h5>Syntax:</h5> <pre> - declare int %llvm.cttz(int <src>) + declare sbyte %llvm.cttz.i8(sbyte <src>) + declare short %llvm.cttz.i16(short <src>) + declare int %llvm.cttz.i32(int <src>) + declare long %llvm.cttz.i64(long <src>) </pre> <h5>Overview:</h5> <p> -The '<tt>llvm.cttz</tt>' intrinsic counts the number of trailing zeros. +The '<tt>llvm.cttz</tt>' family of intrinsic functions counts the number of +trailing zeros. </p> <h5>Arguments:</h5> |