Elimate handling of ZERO_EXTEND_INREG. This causes the PPC backend to emit
authorChris Lattner <sabre@nondot.org>
Wed, 13 Apr 2005 02:40:26 +0000 (02:40 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 13 Apr 2005 02:40:26 +0000 (02:40 +0000)
andi instructions instead of rlwinm instructions for zero extend, but they
seem like they would take the same time.

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

lib/Target/PowerPC/PPC64ISelPattern.cpp
lib/Target/PowerPC/PPCISelPattern.cpp

index 0d706f80f8fd73e51d8a5e0d36002d016c310c42..5604a9e8e54c1af665751b6b4dc4eda785e4afd8 100644 (file)
@@ -1154,18 +1154,6 @@ unsigned ISel::SelectExpr(SDOperand N) {
     }
     return Result;
     
-  case ISD::ZERO_EXTEND_INREG:
-    Tmp1 = SelectExpr(N.getOperand(0));
-    switch(cast<MVTSDNode>(Node)->getExtraValueType()) {
-    default: Node->dump(); assert(0 && "Unhandled ZERO_EXTEND type"); break;
-    case MVT::i16:  Tmp2 = 16; break;
-    case MVT::i8:   Tmp2 = 24; break;
-    case MVT::i1:   Tmp2 = 31; break;
-    }
-    BuildMI(BB, PPC::RLWINM, 4, Result).addReg(Tmp1).addImm(0).addImm(Tmp2)
-      .addImm(31);
-    return Result;
-    
   case ISD::CopyFromReg:
     if (Result == 1)
       Result = ExprMap[N.getValue(0)] = MakeReg(N.getValue(0).getValueType());
index a2b1e739bdc6a972e9aa25e82b9963931607da76..1e4b88f5b49e128f671399c21f88da91eed53cfe 100644 (file)
@@ -1636,19 +1636,6 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) {
     }
     return Result;
     
-  case ISD::ZERO_EXTEND_INREG:
-    Tmp1 = SelectExpr(N.getOperand(0));
-    switch(cast<MVTSDNode>(Node)->getExtraValueType()) {
-    default: Node->dump(); assert(0 && "Unhandled ZERO_EXTEND type"); break;
-    case MVT::i16:  Tmp2 = 16; break;
-    case MVT::i8:   Tmp2 = 24; break;
-    case MVT::i1:   Tmp2 = 31; break;
-    }
-    Opc = Recording ? PPC::RLWINMo : PPC::RLWINM;
-    RecordSuccess = true;
-    BuildMI(BB, Opc, 4, Result).addReg(Tmp1).addImm(0).addImm(Tmp2).addImm(31);
-    return Result;
-    
   case ISD::CopyFromReg:
     if (Result == 1)
       Result = ExprMap[N.getValue(0)] = MakeReg(N.getValue(0).getValueType());