From 9095c64147cac1e3a313e3384bbff6a3fec2b0f0 Mon Sep 17 00:00:00 2001 From: John Criswell Date: Wed, 9 Jun 2004 15:18:51 +0000 Subject: [PATCH] Fix for PR#366. We use getClassB() so that we can handle cast instructions that cast to bool. llvm-svn: 14096 --- llvm/lib/Target/X86/InstSelectSimple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/X86/InstSelectSimple.cpp b/llvm/lib/Target/X86/InstSelectSimple.cpp index c6afdde1d0d6..59d56bc743c5 100644 --- a/llvm/lib/Target/X86/InstSelectSimple.cpp +++ b/llvm/lib/Target/X86/InstSelectSimple.cpp @@ -2861,7 +2861,7 @@ void ISel::visitLoadInst(LoadInst &I) { case Instruction::Cast: // If this is a cast from a signed-integer type to a floating point type, // fold the cast here. - if (getClass(User->getType()) == cFP && + if (getClassB(User->getType()) == cFP && (I.getType() == Type::ShortTy || I.getType() == Type::IntTy || I.getType() == Type::LongTy)) { unsigned DestReg = getReg(User);