summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-08 21:18:49 +0000
committerChris Lattner <sabre@nondot.org>2001-07-08 21:18:49 +0000
commit31feae855069992ad3806d44873e6b54c2f88e3e (patch)
tree8f3259bec709b99852c488ffa85a5c06f38684f6 /llvm/lib
parent1851cad21fc4b06069a92eb867a69d03664144ee (diff)
downloadbcm5719-llvm-31feae855069992ad3806d44873e6b54c2f88e3e.tar.gz
bcm5719-llvm-31feae855069992ad3806d44873e6b54c2f88e3e.zip
Implement checking for new instructions
llvm-svn: 163
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 43eb26fd30f..79d90e65326 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -25,7 +25,7 @@
#include "llvm/iOther.h"
#include "llvm/iTerminators.h"
#include "llvm/Tools/STLExtras.h"
-//#include "llvm/Assembly/Writer.h"
+#include "llvm/Assembly/Writer.h"
#include <algorithm>
#include <map>
#include <set>
@@ -430,7 +430,7 @@ void SCCP::UpdateInstruction(Instruction *I) {
//===-------------------------------------------------------------------===//
// Handle Unary instructions...
//
- if (I->isUnaryOp()) {
+ if (I->isUnaryOp() || I->getOpcode() == Instruction::Cast) {
Value *V = I->getOperand(0);
InstVal &VState = getValueState(V);
if (VState.isOverdefined()) { // Inherit overdefinedness of operand
@@ -456,7 +456,8 @@ void SCCP::UpdateInstruction(Instruction *I) {
//===-----------------------------------------------------------------===//
// Handle Binary instructions...
//
- if (I->isBinaryOp()) {
+ if (I->isBinaryOp() || I->getOpcode() == Instruction::Shl ||
+ I->getOpcode() == Instruction::Shr) {
Value *V1 = I->getOperand(0);
Value *V2 = I->getOperand(1);
OpenPOWER on IntegriCloud