llvm/test/Transforms/InstSimplify
Peter Collingbourne 74eabdd998 Introduce llvm.load.relative intrinsic.
This intrinsic takes two arguments, ``%ptr`` and ``%offset``. It loads
a 32-bit value from the address ``%ptr + %offset``, adds ``%ptr`` to that
value and returns it. The constant folder specifically recognizes the form of
this intrinsic and the constant initializers it may load from; if a loaded
constant initializer is known to have the form ``i32 trunc(x - %ptr)``,
the intrinsic call is folded to ``x``.

LLVM provides that the calculation of such a constant initializer will
not overflow at link time under the medium code model if ``x`` is an
``unnamed_addr`` function. However, it does not provide this guarantee for
a constant initializer folded into a function body. This intrinsic can be
used to avoid the possibility of overflows when loading from such a constant.

Differential Revision: http://reviews.llvm.org/D18367

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-22 21:18:02 +00:00
..
2010-12-20-Boolean.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
2011-01-14-Thread.ll
2011-02-01-Vector.ll
2011-09-05-InsertExtractValue.ll [InstSimplify] Don't assume getAggregateElement will succeed 2015-08-18 22:07:25 +00:00
2011-10-27-BinOpCrash.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
2011-11-23-MaskedBitsCrash.ll
2013-04-19-ConstantFoldingCrash.ll
add-mask.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
AndOrXor.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
apint-or.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
assume.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
bswap.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
call-callconv.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
call.ll [MemoryBuiltins] Remove isOperatorNewLike by consolidating non-null inference handling 2016-01-04 22:49:23 +00:00
compare.ll Add optimization for 'icmp slt (or A, B), A' and some related idioms based on knowledge of the sign bit for A and B. 2016-04-21 00:53:14 +00:00
dead-code-removal.ll
exact-nsw-nuw.ll
fast-math.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
fdiv.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
floating-point-arithmetic.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
floating-point-compare.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
fold-builtin-fma.ll
gep.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
implies.ll [ValueTracking] Correct lit test comments. NFC. 2016-04-18 19:11:45 +00:00
load-relative-32.ll Introduce llvm.load.relative intrinsic. 2016-04-22 21:18:02 +00:00
load-relative.ll Introduce llvm.load.relative intrinsic. 2016-04-22 21:18:02 +00:00
load.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
maxmin.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
noalias-ptr.ll [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
past-the-end.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
phi.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
ptr_diff.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
reassociate.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
rem.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
select.ll
shift-128-kb.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
shr-nop.ll Fix CHECK directives that weren't checking. 2015-08-31 21:10:35 +00:00
undef.ll [InstSimplify] regenerate checks using a script 2016-03-25 20:12:25 +00:00
vector_gep.ll [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
vector_ptr_bitcast.ll [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00