[llvm-commits] [llvm-gcc-4.0] r40694 - /llvm-gcc-4.0/trunk/gcc/config/rs6000/llvm-rs6000.cpp
Chris Lattner
sabre at nondot.org
Wed Aug 1 15:21:42 PDT 2007
Author: lattner
Date: Wed Aug 1 17:21:42 2007
New Revision: 40694
URL: http://llvm.org/viewvc/llvm-project?rev=40694&view=rev
Log:
fix the build with the new llvmbuilder changes.
Modified:
llvm-gcc-4.0/trunk/gcc/config/rs6000/llvm-rs6000.cpp
Modified: llvm-gcc-4.0/trunk/gcc/config/rs6000/llvm-rs6000.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/config/rs6000/llvm-rs6000.cpp?rev=40694&r1=40693&r2=40694&view=diff
==============================================================================
--- llvm-gcc-4.0/trunk/gcc/config/rs6000/llvm-rs6000.cpp (original)
+++ llvm-gcc-4.0/trunk/gcc/config/rs6000/llvm-rs6000.cpp Wed Aug 1 17:21:42 2007
@@ -57,7 +57,7 @@
Ops.erase(Ops.begin() + OpNum);
Ops[OpNum] = Ptr;
- Value *V = Builder.CreateCall(IntFn, &Ops[0], Ops.size());
+ Value *V = Builder.CreateCall(IntFn, &Ops[0], &Ops[0]+Ops.size());
if (V->getType() != Type::VoidTy) {
V->setName("tmp");
@@ -297,7 +297,8 @@
const VectorType *PTy = cast<VectorType>(ResultType);
unsigned N = GetAltivecTypeNumFromType(PTy->getElementType());
Function *smax = Intrinsic::getDeclaration(TheModule, smax_iid[N]);
- Result = Builder.CreateCall(smax, Ops[0], Result, "tmp");
+ Value *ActualOps[] = { Ops[0], Result };
+ Result = Builder.CreateCall(smax, ActualOps, ActualOps+2, "tmp");
return true;
}
case ALTIVEC_BUILTIN_ABSS_V4SI:
@@ -321,9 +322,11 @@
Function *smax = Intrinsic::getDeclaration(TheModule, smax_iid[N]);
Function *subss = Intrinsic::getDeclaration(TheModule, subss_iid[N]);
- Result = Builder.CreateCall(subss, Constant::getNullValue(ResultType),
- Ops[0], "tmp");
- Result = Builder.CreateCall(smax, Ops[0], Result, "tmp");
+ Value *ActualOps[] = { Constant::getNullValue(ResultType), Ops[0] };
+ Result = Builder.CreateCall(subss, ActualOps, ActualOps+2, "tmp");
+ ActualOps[0] = Ops[0];
+ ActualOps[1] = Result;
+ Result = Builder.CreateCall(smax, ActualOps, ActualOps+2, "tmp");
return true;
}
}
More information about the llvm-commits
mailing list