diff options
| author | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-09-09 09:53:20 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-09-09 09:53:20 +0000 |
| commit | 2038747fce35d3cab2bd7bfdf8f90cc48051ab2e (patch) | |
| tree | 2e8252b486dfce1dc835c17953aa5db766f4f3bd /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | |
| parent | 1688a772fcd8929751eedb2b9aa33c41fca46bee (diff) | |
| download | llvm-2038747fce35d3cab2bd7bfdf8f90cc48051ab2e.zip llvm-2038747fce35d3cab2bd7bfdf8f90cc48051ab2e.tar.gz llvm-2038747fce35d3cab2bd7bfdf8f90cc48051ab2e.tar.bz2 | |
Fix vector splitting for extract_vector_elt and vector elements of <8-bits.
Summary:
One of the vector splitting paths for extract_vector_elt tries to lower:
define i1 @via_stack_bug(i8 signext %idx) {
%1 = extractelement <2 x i1> <i1 false, i1 true>, i8 %idx
ret i1 %1
}
to:
define i1 @via_stack_bug(i8 signext %idx) {
%base = alloca <2 x i1>
store <2 x i1> <i1 false, i1 true>, <2 x i1>* %base
%2 = getelementptr <2 x i1>, <2 x i1>* %base, i32 %idx
%3 = load i1, i1* %2
ret i1 %3
}
However, the elements of <2 x i1> are not byte-addressible. The result of this
is that the getelementptr expands to '%base + %idx * (1 / 8)' which simplifies
to '%base + %idx * 0', and then simply '%base' causing all values of %idx to
extract element zero.
This commit fixes this by promoting the vector elements of <8-bits to i8 before
splitting the vector.
This fixes a number of test failures in pocl.
Reviewers: pekka.jaaskelainen
Subscribers: pekka.jaaskelainen, llvm-commits
Differential Revision: http://reviews.llvm.org/D12591
llvm-svn: 247128
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
0 files changed, 0 insertions, 0 deletions
