Fix typo that somehow escaped both testing and code inspection.
authorDuncan Sands <baldrick@free.fr>
Tue, 23 Oct 2012 09:07:02 +0000 (09:07 +0000)
committerDuncan Sands <baldrick@free.fr>
Tue, 23 Oct 2012 09:07:02 +0000 (09:07 +0000)
llvm-svn: 166475

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

index 390b63c..7f8c3ae 100644 (file)
@@ -965,7 +965,7 @@ Value *InstCombiner::Descale(Value *Val, APInt Scale, bool &NoSignedWrap) {
         continue;
       }
 
-      if (Cast->getOperand(0)) {
+      if (Cast->getOpcode() == Instruction::Trunc) {
         // Op is truncated from a larger type, descale in the larger type.
         // Suppose Op = trunc X, and we descale X as Y * sext Scale.  Then
         //   trunc (Y * sext Scale) = (trunc Y) * Scale