From: Bruno Cardoso Lopes Date: Tue, 14 Jun 2011 05:00:30 +0000 (+0000) Subject: Update the prefetch intrinsic usage. Now the last argument tells codegen X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2eccb672799d19fb535ce349566fea6729cbb891;p=clang Update the prefetch intrinsic usage. Now the last argument tells codegen whether it's a data or instruction cache access. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132977 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index 14bebaf3c1..6f1c1f24f7 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -351,8 +351,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, llvm::ConstantInt::get(Int32Ty, 0); Locality = (E->getNumArgs() > 2) ? EmitScalarExpr(E->getArg(2)) : llvm::ConstantInt::get(Int32Ty, 3); + Value *Data = llvm::ConstantInt::get(Int32Ty, 1); Value *F = CGM.getIntrinsic(Intrinsic::prefetch, 0, 0); - return RValue::get(Builder.CreateCall3(F, Address, RW, Locality)); + return RValue::get(Builder.CreateCall4(F, Address, RW, Locality, Data)); } case Builtin::BI__builtin_trap: { Value *F = CGM.getIntrinsic(Intrinsic::trap, 0, 0);