[all-commits] [llvm/llvm-project] a73166: [LAA] Use DL to get element size for bound computa...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Wed Oct 7 10:57:49 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a73166a45204378f6f8b4a6ff2d962f0ff56d51e
https://github.com/llvm/llvm-project/commit/a73166a45204378f6f8b4a6ff2d962f0ff56d51e
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-10-07 (Wed, 07 Oct 2020)
Changed paths:
M llvm/lib/Analysis/LoopAccessAnalysis.cpp
M llvm/test/Transforms/LoopVectorize/X86/pr23997.ll
M llvm/test/Transforms/LoopVectorize/runtime-check-pointer-element-type.ll
Log Message:
-----------
[LAA] Use DL to get element size for bound computation.
Currently LAA uses getScalarSizeInBits to compute the size of an element
when computing the end bound of an access.
This does not work as expected for pointers to pointers, because
getScalarSizeInBits will return 0 for pointer types.
By using DataLayout to get the size of the element we can also correctly
handle pointer element types.
Note the changes to the existing test, which seems to also use the wrong
offset for the end.
Fixes PR47751.
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D88953
More information about the All-commits
mailing list