Revert "[SLP] Consider alternatives for cost of select instructions."
authorFlorian Hahn <flo@fhahn.com>
Fri, 30 Oct 2020 21:20:28 +0000 (21:20 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 30 Oct 2020 21:26:14 +0000 (21:26 +0000)
commita1b53db32418cb6ed6f5b2054d15a22b5aa3aeb9
tree9c7d377ab03e6e3a812e1a0ca56deab4222570de
parent408c4408facc3a79ee4ff7e9983cc972f797e176
Revert "[SLP] Consider alternatives for cost of select instructions."

This reverts commit 19225704890632cd2552f41ada41600a20db1371.

This appears to cause a crash in the following example

 a, b, c;
 l() {
   int e = a, f = l, g, h, i, j;
   float *d = c, *k = b;
   for (;;)
     for (; g < f; g++) {
       k[h] = d[i];
       k[h - 1] = d[j];
       h += e << 1;
       i += e;
     }
 }

 clang -cc1 -triple i386-unknown-linux-gnu -emit-obj -target-cpu pentium-m -O1 -vectorize-loops -vectorize-slp reduced.c

 llvm::Type *llvm::Type::getWithNewBitWidth(unsigned int) const: Assertion `isIntOrIntVectorTy() && "Original type expected to be a vector of integers or a scalar integer."' failed.
llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/AArch64/vectorizable-selects-min-max.ll