[PATCH] Loop Vectorizer: Handle pointer stores/loads in getWidestType()

Arnold Schwaighofer aschwaighofer at apple.com
Sun Feb 3 20:45:21 PST 2013


In the loop vectorizer cost model, we used to ignore stores/loads of a pointer
type when computing the widest type within a loop. This meant that if we had
only stores/loads of pointers in a loop we would return a widest type of 8bits
(instead of 32 or 64 bit) and therefore a vector factor that was too big.

Now, if we see a consecutive store/load of pointers we use the size of a pointer
(from data layout).

This problem occured in SingleSource/Benchmarks/Shootout-C++/hash.cpp (reduced
test case is the first test in ptr_store_cost.ll).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Loop-Vectorizer-Handle-pointer-stores-loads-in-getWi.patch
Type: application/octet-stream
Size: 9556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130203/4fdf64b4/attachment.obj>


More information about the llvm-commits mailing list