From 58d13af6f06feeb9e8bdc0a19c32daf70c325c9c Mon Sep 17 00:00:00 2001 From: Zhou Sheng Date: Fri, 22 Feb 2008 10:00:35 +0000 Subject: [PATCH] Fixed a typo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47478 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index d6d87813542..e17d16443a1 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2428,7 +2428,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) { ConstantInt *C2; // X*C1 - X*C2 -> X * (C1-C2) if (X == dyn_castFoldableMul(Op1, C2)) - return BinaryOperator::createMul(Op1, Subtract(C1, C2)); + return BinaryOperator::createMul(X, Subtract(C1, C2)); } return 0; }