[llvm-commits] [llvm] r166475 - /llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp

Duncan Sands baldrick at free.fr
Tue Oct 23 02:07:02 PDT 2012


Author: baldrick
Date: Tue Oct 23 04:07:02 2012
New Revision: 166475

URL: http://llvm.org/viewvc/llvm-project?rev=166475&view=rev
Log:
Fix typo that somehow escaped both testing and code inspection.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=166475&r1=166474&r2=166475&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Tue Oct 23 04:07:02 2012
@@ -965,7 +965,7 @@
         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





More information about the llvm-commits mailing list