llvm-6502/lib
Arnold Schwaighofer ae4e1a94e3 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
2013-07-13 19:09:29 +00:00
..
Analysis Fix logic error optimizing "icmp pred (urem X, Y), Y" where pred is signed. 2013-07-12 23:42:57 +00:00
AsmParser Target/X86: Add explicit Win64 and System V/x86-64 calling conventions. 2013-07-12 06:02:35 +00:00
Bitcode Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. 2013-07-11 16:22:38 +00:00
CodeGen Pass SmallVector by const reference instead of by value. 2013-07-13 07:43:40 +00:00
DebugInfo Spell correct (s/begining/beginning/) 2013-06-19 21:42:05 +00:00
ExecutionEngine Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size. 2013-07-04 01:31:24 +00:00
IR Target/X86: Add explicit Win64 and System V/x86-64 calling conventions. 2013-07-12 06:02:35 +00:00
IRReader keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
Linker Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer. 2013-05-28 15:17:05 +00:00
MC Put ELF COMDAT relocations into the relevant COMDAT group. 2013-07-10 20:58:17 +00:00
Object Change llvm-ar to use lib/Object. 2013-07-12 20:21:39 +00:00
Option Fix a crash bug in dumping options with groups 2013-06-26 22:43:37 +00:00
Support Windows/TimeValue.inc: Mute prefixed '0' on %d to emulate %e. 2013-07-12 02:13:03 +00:00
TableGen keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
Target Reduce large list of macros to the primary platform macros. Distingiush 2013-07-13 17:59:55 +00:00
Transforms LoopVectorizer: Disallow reductions whose header phi is used outside the loop 2013-07-13 19:09:29 +00:00
CMakeLists.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
LLVMBuild.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
Makefile Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00