diff options
author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2013-07-13 19:09:29 +0000 |
---|---|---|
committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2013-07-13 19:09:29 +0000 |
commit | ae4e1a94e3fb7d1d2d0eec6eb7d04b74326c8453 (patch) | |
tree | a9a8bb40aac5fa5f36af25aa312ebc4f48224f8d /test/CodeGen/PowerPC/mcm-6.ll | |
parent | 0a14e7123269ffc84b26d87676ddce1afc335f02 (diff) | |
download | external_llvm-ae4e1a94e3fb7d1d2d0eec6eb7d04b74326c8453.zip external_llvm-ae4e1a94e3fb7d1d2d0eec6eb7d04b74326c8453.tar.gz external_llvm-ae4e1a94e3fb7d1d2d0eec6eb7d04b74326c8453.tar.bz2 |
LoopVectorizer: Disallow reductions whose header phi is used outside the loop
If an outside loop user of the reduction value uses the header phi node we
cannot just reduce the vectorized phi value in the vector code epilog because
we would loose VF-1 reductions.
lp:
p = phi (0, lv)
lv = lv + 1
...
brcond , lp, outside
outside:
usr = add 0, p
(Say the loop iterates two times, the value of p coming out of the loop is one).
We cannot just transform this to:
vlp:
p = phi (<0,0>, lv)
lv = lv + <1,1>
..
brcond , lp, outside
outside:
p_reduced = p[0] + [1];
usr = add 0, p_reduced
(Because the original loop iterated two times the vectorized loop would iterate
one time, but p_reduced ends up being zero instead of one).
We would have to execute VF-1 iterations in the scalar remainder loop in such
cases. For now, just disable vectorization.
PR16522
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/mcm-6.ll')
0 files changed, 0 insertions, 0 deletions