1 //===- llvm/Transforms/Utils/VectorUtils.h - Vector utilities -*- C++ -*-=====//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines some vectorizer utilities.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TRANSFORMS_UTILS_VECTORUTILS_H
15 #define LLVM_TRANSFORMS_UTILS_VECTORUTILS_H
19 /// \brief Identify if the intrinsic is trivially vectorizable.
21 /// This method returns true if the intrinsic's argument types are all
22 /// scalars for the scalar form of the intrinsic and all vectors for
23 /// the vector form of the intrinsic.
24 static inline bool isTriviallyVectorizable(Intrinsic::ID ID) {
32 case Intrinsic::log10:
35 case Intrinsic::copysign:
36 case Intrinsic::floor:
38 case Intrinsic::trunc:
40 case Intrinsic::nearbyint:
41 case Intrinsic::round:
42 case Intrinsic::ctpop:
45 case Intrinsic::fmuladd: