Fix for PR#366. We use getClassB() so that we can handle cast instructions
that cast to bool.
llvm-svn: 14096
diff --git a/llvm/lib/Target/X86/InstSelectSimple.cpp b/llvm/lib/Target/X86/InstSelectSimple.cpp
index c6afdde..59d56bc 100644
--- a/llvm/lib/Target/X86/InstSelectSimple.cpp
+++ b/llvm/lib/Target/X86/InstSelectSimple.cpp
@@ -2861,7 +2861,7 @@
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);