forked from OSchip/llvm-project
Update the prefetch intrinsic usage. Now the last argument tells codegen
whether it's a data or instruction cache access. llvm-svn: 132977
This commit is contained in:
parent
dc9ff3a4b1
commit
3b0297a98c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue