diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-11-12 15:10:30 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-11-12 15:10:30 +0000 |
commit | 0f4f4806b376827191ecd794c5795a01925dfcac (patch) | |
tree | 719105bbb0fcde9ed8601ef923417591e7e734af /llvm/lib/Analysis/VectorUtils.cpp | |
parent | 186d5bd874c5610bbfbac8c29a0dc2934c519c8a (diff) | |
download | bcm5719-llvm-0f4f4806b376827191ecd794c5795a01925dfcac.tar.gz bcm5719-llvm-0f4f4806b376827191ecd794c5795a01925dfcac.zip |
[VectorUtils] reorder list of vectorizable intrinsics; NFC
We need to add funnel-shifts to this list, so clean up
the random order before it gets worse.
llvm-svn: 346660
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r-- | llvm/lib/Analysis/VectorUtils.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index 38dca50e82a..2fab03c988b 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -37,13 +37,17 @@ static cl::opt<unsigned> MaxInterleaveGroupFactor( cl::desc("Maximum factor for an interleaved access group (default = 8)"), cl::init(8)); -/// Identify if the intrinsic is trivially vectorizable. -/// This method returns true if the intrinsic's argument types are all -/// scalars for the scalar form of the intrinsic and all vectors for -/// the vector form of the intrinsic. +/// Return true if all of the intrinsic's arguments and return type are scalars +/// for the scalar form of the intrinsic and vectors for the vector form of the +/// intrinsic. bool llvm::isTriviallyVectorizable(Intrinsic::ID ID) { switch (ID) { - case Intrinsic::sqrt: + case Intrinsic::bswap: // Begin integer bit-manipulation. + case Intrinsic::bitreverse: + case Intrinsic::ctpop: + case Intrinsic::ctlz: + case Intrinsic::cttz: + case Intrinsic::sqrt: // Begin floating-point. case Intrinsic::sin: case Intrinsic::cos: case Intrinsic::exp: @@ -63,14 +67,9 @@ bool llvm::isTriviallyVectorizable(Intrinsic::ID ID) { case Intrinsic::rint: case Intrinsic::nearbyint: case Intrinsic::round: - case Intrinsic::bswap: - case Intrinsic::bitreverse: - case Intrinsic::ctpop: case Intrinsic::pow: case Intrinsic::fma: case Intrinsic::fmuladd: - case Intrinsic::ctlz: - case Intrinsic::cttz: case Intrinsic::powi: case Intrinsic::canonicalize: return true; |