aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-02 02:16:23 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-02 02:16:23 +0000
commit832254e1c2387c0cbeb0a820b8315fbe85cb003a (patch)
treed3d0c15237b69dfda4ea152775417f2cc67b369b /lib/Analysis
parent9a2ef9509e76869c3d658fb3e321d9b9e9d479d9 (diff)
downloadexternal_llvm-832254e1c2387c0cbeb0a820b8315fbe85cb003a.zip
external_llvm-832254e1c2387c0cbeb0a820b8315fbe85cb003a.tar.gz
external_llvm-832254e1c2387c0cbeb0a820b8315fbe85cb003a.tar.bz2
Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ConstantFolding.cpp4
-rw-r--r--lib/Analysis/IPA/Andersens.cpp3
-rw-r--r--lib/Analysis/ScalarEvolution.cpp2
3 files changed, 1 insertions, 8 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index 1bf6b50..25a64ab 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -216,10 +216,6 @@ Constant *llvm::ConstantFoldInstOperands(const Instruction* I,
case Instruction::FCmp:
return ConstantExpr::getCompare(cast<CmpInst>(I)->getPredicate(), Ops[0],
Ops[1]);
- case Instruction::Shl:
- case Instruction::LShr:
- case Instruction::AShr:
- return ConstantExpr::get(Opc, Ops[0], Ops[1]);
case Instruction::Trunc:
case Instruction::ZExt:
case Instruction::SExt:
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index b6855f6..aa2188b 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -776,9 +776,6 @@ void Andersens::visitInstruction(Instruction &I) {
case Instruction::Unwind:
case Instruction::Unreachable:
case Instruction::Free:
- case Instruction::Shl:
- case Instruction::LShr:
- case Instruction::AShr:
case Instruction::ICmp:
case Instruction::FCmp:
return;
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 75dabf7..a81f24f 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -1736,7 +1736,7 @@ ComputeLoadConstantCompareIterationCount(LoadInst *LI, Constant *RHS,
/// CanConstantFold - Return true if we can constant fold an instruction of the
/// specified type, assuming that all operands were constants.
static bool CanConstantFold(const Instruction *I) {
- if (isa<BinaryOperator>(I) || isa<ShiftInst>(I) || isa<CmpInst>(I) ||
+ if (isa<BinaryOperator>(I) || isa<CmpInst>(I) ||
isa<SelectInst>(I) || isa<CastInst>(I) || isa<GetElementPtrInst>(I))
return true;