[LLVMdev] PR21302: Vectorize only bottom-tested loops
Michael Zolotukhin
mzolotukhin at apple.com
Tue Dec 2 14:46:33 PST 2014
Hi,
This patch fixes the problem described in PR21302.
The issue is that currently vectorizer sometimes vectorizes loops that are not bottom-tested, i.e. in which each iteration starts from checking the termination condition. That causes an extra-iteration to be executed in vectorized version in some cases.
The patch consists of two parts:
1) Update three existing tests, that contained loop in such forms. After the fix these loops aren’t vectorized any longer, so I applied loop-rotate+simplifycfg to them. This change is quite mechanical.
2) The fix itself and a regression test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr21302-part1.patch
Type: application/octet-stream
Size: 20936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141202/6bdb64e7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr21302-part2.patch
Type: application/octet-stream
Size: 1834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141202/6bdb64e7/attachment-0001.obj>
-------------- next part --------------
Do they look ok?
Thanks,
Michael
More information about the llvm-dev
mailing list