blob: e5906c6ce68c6fab9c81cedbfeb65f2b9d9f8d8a [file] [log] [blame]
Craig Topper11655b22017-10-13 00:20:47 +00001; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
Craig Topperd710ada2018-02-21 00:15:48 +00002; NOTE: clwb is available in Skylake Server, not available in the newer
3; NOTE: Cannon Lake arch, but available again in the newer Ice Lake arch.
Craig Topper11655b22017-10-13 00:20:47 +00004; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=clwb | FileCheck %s
Craig Topperd710ada2018-02-21 00:15:48 +00005; RUN: llc < %s -mtriple=i686-apple-darwin -mcpu=skx | FileCheck %s
6; RUN: not llc < %s -mtriple=i686-apple-darwin -mcpu=cannonlake 2>&1 | FileCheck %s --check-prefix=CNL
7; RUN: llc < %s -mtriple=i686-apple-darwin -mcpu=icelake | FileCheck %s
8
9; CNL: LLVM ERROR: Cannot select: intrinsic %llvm.x86.clwb
Craig Topper11655b22017-10-13 00:20:47 +000010
11define void @clwb(i8* %p) nounwind {
12; CHECK-LABEL: clwb:
Francis Visoiu Mistrih25528d62017-12-04 17:18:51 +000013; CHECK: ## %bb.0:
Craig Topper11655b22017-10-13 00:20:47 +000014; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
15; CHECK-NEXT: clwb (%eax)
16; CHECK-NEXT: retl
17 tail call void @llvm.x86.clwb(i8* %p)
18 ret void
19}
20declare void @llvm.x86.clwb(i8*) nounwind