IslNodeBuilder: Invariant load hoisting of elements with differing sizes
commitac912f493ac6050deb45f9b0262935935d928f95
authorTobias Grosser <tobias@grosser.es>
Sat, 6 Feb 2016 21:23:39 +0000 (6 21:23 +0000)
committerTobias Grosser <tobias@grosser.es>
Sat, 6 Feb 2016 21:23:39 +0000 (6 21:23 +0000)
treeb59c25a1f0d15932cab03ba1617b922db84196e2
parent7313aa576dc9327e7d68660c007a317bd498e372
IslNodeBuilder: Invariant load hoisting of elements with differing sizes

Always use access-instruction pointer type to load the invariant values.
Otherwise mismatches between ScopArrayInfo element type and memory access
element type will result in invalid casts. These type mismatches are after
r259784 a lot more common and also arise with types of different size, which
have not been handled before.

Interestingly, this change actually simplifies the code, as we now have only
one code path that is always taken, rather then a standard code path for the
common case and a "fixup" code path that replaces the standard code path in
case of mismatching types.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@260009 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IslNodeBuilder.cpp
test/Isl/CodeGen/invariant_load_different_sized_types.ll [new file with mode: 0644]
test/Isl/CodeGen/multiple-types-invariant-load.ll
test/ScopInfo/invariant_load_access_classes_different_base_type.ll
test/ScopInfo/invariant_load_access_classes_different_base_type_escaping.ll
test/ScopInfo/invariant_load_access_classes_different_base_type_same_pointer.ll
test/ScopInfo/invariant_load_access_classes_different_base_type_same_pointer_escaping.ll