From dd763f401e5cdeaab7d7b6278694ba5bb6cbd308 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 29 Sep 2004 03:16:24 +0000 Subject: [PATCH] Hrm, really, all tests passed without this, but it is scary to think how... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16568 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 37ba949a2e0..4d0225cf507 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -1766,9 +1766,9 @@ Instruction *InstCombiner::visitSetCondInst(BinaryOperator &I) { case Instruction::Cast: { // (setcc (cast X to larger), CI) const Type *SrcTy = LHSI->getOperand(0)->getType(); if (SrcTy->isIntegral() && LHSI->getType()->isIntegral()) { - unsigned SrcBits = SrcTy->getPrimitiveSize(); + unsigned SrcBits = SrcTy->getPrimitiveSize()*8; if (SrcTy == Type::BoolTy) SrcBits = 1; - unsigned DestBits = LHSI->getType()->getPrimitiveSize(); + unsigned DestBits = LHSI->getType()->getPrimitiveSize()*8; if (LHSI->getType() == Type::BoolTy) DestBits = 1; if (SrcBits < DestBits) { // Check to see if the comparison is always true or false.