Fix for PR#366. We use getClassB() so that we can handle cast instructions
authorJohn Criswell <criswell@uiuc.edu>
Wed, 9 Jun 2004 15:18:51 +0000 (15:18 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Wed, 9 Jun 2004 15:18:51 +0000 (15:18 +0000)
that cast to bool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14096 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/X86ISelSimple.cpp

index c6afdde1d0d61a503df46c64a5d29a3f72ccdd51..59d56bc743c528b38b2d142c3636e91232f64a96 100644 (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);
index c6afdde1d0d61a503df46c64a5d29a3f72ccdd51..59d56bc743c528b38b2d142c3636e91232f64a96 100644 (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);