aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-06-05 16:05:55 +0000
committerDan Gohman <gohman@apple.com>2007-06-05 16:05:55 +0000
commitd8af90c1da64b81a7aa167b5adcc1e81b0741252 (patch)
tree85a88b88d821ee0558d65b9728b905b37f98a276
parent341dcccb4e1f190f4aee12e92c2b7c2cb68c520d (diff)
Allow insertelement, extractelement, and shufflevector to be hoisted/sunk
by LICM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37435 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/LICM.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 1680e43fe4..8139959a26 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -389,7 +389,9 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
// Otherwise these instructions are hoistable/sinkable
return isa<BinaryOperator>(I) || isa<CastInst>(I) ||
- isa<SelectInst>(I) || isa<GetElementPtrInst>(I) || isa<CmpInst>(I);
+ isa<SelectInst>(I) || isa<GetElementPtrInst>(I) || isa<CmpInst>(I) ||
+ isa<InsertElementInst>(I) || isa<ExtractElementInst>(I) ||
+ isa<ShuffleVectorInst>(I);
}
/// isNotUsedInLoop - Return true if the only users of this instruction are