llvm-project/llvm/test/Transforms/LoopIdiom
Elena Demikhovsky 945b7e5aa6 Adding a width of the GEP index to the Data Layout.
Making a width of GEP Index, which is used for address calculation, to be one of the pointer properties in the Data Layout.
p[address space]:size:memory_size:alignment:pref_alignment:index_size_in_bits.
The index size parameter is optional, if not specified, it is equal to the pointer size.

Till now, the InstCombiner normalized GEPs and extended the Index operand to the pointer width.
It works fine if you can convert pointer to integer for address calculation and all registered targets do this.
But some ISAs have very restricted instruction set for the pointer calculation. During discussions were desided to retrieve information for GEP index from the Data Layout.
http://lists.llvm.org/pipermail/llvm-dev/2018-January/120416.html

I added an interface to the Data Layout and I changed the InstCombiner and some other passes to take the Index width into account.
This change does not affect any in-tree target. I added tests to cover data layouts with explicitly specified index size.

Differential Revision: https://reviews.llvm.org/D42123

llvm-svn: 325102
2018-02-14 06:58:08 +00:00
..
AMDGPU
ARM
X86
basic-address-space.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
basic.ll [LoopIdiom] Be more aggressive when setting alignment in memcpy 2018-02-08 17:33:08 +00:00
crash.ll
ctpop-multiple-users-crash.ll
debug-line.ll
int_sideeffect.ll Add an @llvm.sideeffect intrinsic 2017-11-08 21:59:51 +00:00
lir-heurs-multi-block-loop.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
memset_noidiom.ll
non-canonical-loop.ll
non-integral-pointers.ll
nontemporal_store.ll
pr28196.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
pr33114.ll
scev-invalidation.ll
struct-custom-dl.ll Adding a width of the GEP index to the Data Layout. 2018-02-14 06:58:08 +00:00
struct.ll
struct_pattern.ll
unordered-atomic-memcpy-noarch.ll
unroll-custom-dl.ll Adding a width of the GEP index to the Data Layout. 2018-02-14 06:58:08 +00:00
unroll.ll
unsafe.ll
unwind.ll