Fix bug: test/Regression/Transforms/LevelRaise/2002-07-16-RaiseCrash2.ll

llvm-svn: 2932
This commit is contained in:
Chris Lattner 2002-07-16 21:41:31 +00:00
parent b744c9ba24
commit 811bd41229
1 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,9 @@ static bool HandleCastToPointer(BasicBlock::iterator BI,
for (Value::use_iterator I = CI.use_begin(), E = CI.use_end();
I != E; ++I) {
if (BinaryOperator *BO = dyn_cast<BinaryOperator>(*I)) {
if (BO->getOpcode() != Instruction::Add)
if (BO->getOpcode() != Instruction::Add ||
// Avoid add sbyte* %X, %X cases...
BO->getOperand(0) == BO->getOperand(1))
return false;
} else {
return false;