llvm/lib/Transforms
Quentin Colombet 30c0f72237 [CodeGenPrepare] Move away sign extensions that get in the way of addressing
mode.

Basically the idea is to transform code like this:
%idx = add nsw i32 %a, 1
%sextidx = sext i32 %idx to i64
%gep = gep i8* %myArray, i64 %sextidx
load i8* %gep

Into:
%sexta = sext i32 %a to i64
%idx = add nsw i64 %sexta, 1
%gep = gep i8* %myArray, i64 %idx
load i8* %gep

That way the computation can be folded into the addressing mode.

This transformation is done as part of the addressing mode matcher.
If the matching fails (not profitable, addressing mode not legal, etc.), the
matcher will revert the related promotions.

<rdar://problem/15519855>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200947 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-06 21:44:56 +00:00
..
Hello Set LLVM_EXPORTED_SYMBOL_FILE in CMakeLists whose corresponding Makefiles do so. 2013-12-29 23:06:49 +00:00
InstCombine Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
Instrumentation Fix a bug in gcov instrumentation introduced by r195513. <rdar://15930350> 2014-01-31 05:24:01 +00:00
IPO Set default of inlinecold-threshold to 225. 2014-02-06 01:59:22 +00:00
ObjCARC Update optimization passes to handle inalloca arguments 2014-01-28 02:38:36 +00:00
Scalar [CodeGenPrepare] Move away sign extensions that get in the way of addressing 2014-02-06 21:44:56 +00:00
Utils SimplifyLibCalls: Push TLI through the exp2->ldexp transform. 2014-02-04 20:27:23 +00:00
Vectorize Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile