Index: docs/LangRef.html =================================================================== --- docs/LangRef.html +++ docs/LangRef.html @@ -329,6 +329,8 @@
This is an overloaded intrinsic. You can use llvm.assume.aligned on any + integer bit width for the offset and for different address spaces.
+ ++ declare i8* @llvm.assume.aligned.p0i8.i64(i8* <addr>, i32 <align>, i64 <offset>) ++ +
The 'llvm.assume.aligned.*' intrinsics allow the optimizer to assume + that the address returned (which references the same memory location as the + address provided) is the given number of bytes offset from an address with the + alignment specified.
+ +The first argument is a pointer about which an alignment assumption is to be made. + This pointer value is also the return value of the intrinsic, and the assumption + applies to uses of this return value.
+ +The second argument is the alignment.
+ +The third argument is the offset from the provided address to the + address with the specified alignment. For example, if an alignment of 32 is + specified, and an offset of 8 is specified, then the return value minus 8 bytes + is assumed to be 32-byte aligned.
+ +The optimizer may use the assumption specified to override the alignments + specified on loads and stores, memory intrinsics, and other alignment-sensitive + instructions which use the returned address. This applies not only to direct + uses of the return address, but also to uses of addresses derived from the + returned address.
+