}
//===----------------------------------------------------------------------===//
-// CLFLUSHOPT
+// CLFLUSHOPT and CLWB
let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
def int_x86_clflushopt : GCCBuiltin<"__builtin_ia32_clflushopt">,
Intrinsic<[], [llvm_ptr_ty], []>;
+
+ def int_x86_clwb : GCCBuiltin<"__builtin_ia32_clwb">,
+ Intrinsic<[], [llvm_ptr_ty], []>;
}
//===----------------------------------------------------------------------===//
def CLFLUSHOPT : I<0xAE, MRM7m, (outs), (ins i8mem:$src),
"clflushopt\t$src", [(int_x86_clflushopt addr:$src)]>, PD;
-// TODO: Add an instrincis for this.
let Predicates = [HasCLWB] in
-def CLWB : I<0xAE, MRM6m, (outs), (ins i8mem:$src), "clwb\t$src", []>, PD;
+def CLWB : I<0xAE, MRM6m, (outs), (ins i8mem:$src), "clwb\t$src",
+ [(int_x86_clwb addr:$src)]>, PD;
//===----------------------------------------------------------------------===//