LoopVectorize: Use the dependence test utility class
authorArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 24 Jun 2013 03:55:48 +0000 (03:55 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Mon, 24 Jun 2013 03:55:48 +0000 (03:55 +0000)
commitcbfa1ca993363ca5c4dbf6c913abc957c584cbac
tree843c01b5984a64c8a87bc718892f4f3333485992
parent5df684a6d1bc655c93df4d2f1efafe9093420f4f
LoopVectorize: Use the dependence test utility class

We now no longer need alias analysis - the cases that alias analysis would
handle are now handled as accesses with a large dependence distance.

We can now vectorize loops with simple constant dependence distances.

  for (i = 8; i < 256; ++i) {
    a[i] = a[i+4] * a[i+8];
  }

  for (i = 8; i < 256; ++i) {
    a[i] = a[i-4] * a[i-8];
  }

We would be able to vectorize about 200 more loops (in many cases the cost model
instructs us no to) in the test suite now. Results on x86-64 are a wash.

I have seen one degradation in ammp. Interestingly, the function in which we
now vectorize a loop is never executed so we probably see some instruction
cache effects. There is a 2% improvement in h264ref. There is one or the other
TSCV loop kernel that speeds up.

radar://13681598

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184685 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/12-12-11-if-conv.ll
test/Transforms/LoopVectorize/memdep.ll [new file with mode: 0644]
test/Transforms/LoopVectorize/runtime-check.ll