summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-18 18:27:05 +0000
committerChris Lattner <sabre@nondot.org>2006-09-18 18:27:05 +0000
commitde0779259569d61e93152e644c233ff2fd3c1776 (patch)
tree4113761e7e3dd5355c661788b8fca00e8cce91d8 /llvm/lib/Transforms/Scalar
parent3425123ceda06c4eee12ba840752dc18ef3ba6ad (diff)
downloadbcm5719-llvm-de0779259569d61e93152e644c233ff2fd3c1776.tar.gz
bcm5719-llvm-de0779259569d61e93152e644c233ff2fd3c1776.zip
Fix an infinite loop building the CFE
llvm-svn: 30465
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index c3d6f1465eb..7a3b97783b2 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -3988,7 +3988,8 @@ Instruction *InstCombiner::visitSetCondInst(SetCondInst &I) {
// preferable because it allows the C<<Y expression to be hoisted out
// of a loop if Y is invariant and X is not.
if (Shift && Shift->hasOneUse() && CI->isNullValue() &&
- I.isEquality() && !Shift->isArithmeticShift()) {
+ I.isEquality() && !Shift->isArithmeticShift() &&
+ isa<Instruction>(Shift->getOperand(0))) {
// Compute C << Y.
Value *NS;
if (Shift->getOpcode() == Instruction::Shr) {
OpenPOWER on IntegriCloud