r202259 - AArch64: use less cluttered intrinsic for vtbl/vtbx

Tim Northover tnorthover at apple.com
Wed Feb 26 03:55:15 PST 2014


Author: tnorthover
Date: Wed Feb 26 05:55:15 2014
New Revision: 202259

URL: http://llvm.org/viewvc/llvm-project?rev=202259&view=rev
Log:
AArch64: use less cluttered intrinsic for vtbl/vtbx

The table is always 128-bit so there's no reason to specify it every time we
want the intrinsic.

Modified:
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=202259&r1=202258&r2=202259&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Feb 26 05:55:15 2014
@@ -3120,11 +3120,10 @@ static Value *packTBLDVectorList(CodeGen
 
   TblTy = llvm::VectorType::get(TblTy->getElementType(),
                                 2*TblTy->getNumElements());
-  llvm::Type *Tys[2] = { ResTy, TblTy };
 
   Function *TblF;
   TblOps.push_back(IndexOp);
-  TblF = CGF.CGM.getIntrinsic(IntID, Tys);
+  TblF = CGF.CGM.getIntrinsic(IntID, ResTy);
   
   return CGF.EmitNeonCall(TblF, TblOps, Name);
 }
@@ -3190,9 +3189,6 @@ static Value *EmitAArch64TblBuiltinExpr(
   }
 
   Arg = E->getArg(TblPos);
-  llvm::Type *TblTy = CGF.ConvertType(Arg->getType());
-  llvm::VectorType *VTblTy = cast<llvm::VectorType>(TblTy);
-  llvm::Type *Tys[2] = { Ty, VTblTy };
   unsigned nElts = VTy->getNumElements();  
 
   // AArch64 scalar builtins are not overloaded, they do not have an extra
@@ -3306,7 +3302,7 @@ static Value *EmitAArch64TblBuiltinExpr(
   if (!Int)
     return 0;
 
-  Function *F = CGF.CGM.getIntrinsic(Int, Tys);
+  Function *F = CGF.CGM.getIntrinsic(Int, Ty);
   return CGF.EmitNeonCall(F, Ops, s);
 }
 





More information about the cfe-commits mailing list