Fix for PR#366. We use getClassB() so that we can handle cast instructions

that cast to bool.

llvm-svn: 14096
This commit is contained in:
John Criswell 2004-06-09 15:18:51 +00:00
parent 35167c3087
commit 9095c64147
1 changed files with 1 additions and 1 deletions

View File

@ -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);