================
@@ -0,0 +1,40 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=riscv32 -mattr=+xmipscbop -mattr=+m -verify-machineinstrs 
< %s \
+; RUN:   | FileCheck %s -check-prefix=RV32XMIPSPREFETCH
+; RUN: llc -mtriple=riscv64 -mattr=+xmipscbop -mattr=+m -verify-machineinstrs 
< %s \
+; RUN:   | FileCheck %s -check-prefix=RV64XMIPSPREFETCH
+
+define dso_local void @prefetch_read(ptr noundef %a) {
+; RV32XMIPSPREFETCH-LABEL: prefetch_read:
+; RV32XMIPSPREFETCH:    mips.perf       8, 511(a0)
+;
+; RV64XMIPSPREFETCH-LABEL: prefetch_read:
+; RV64XMIPSPREFETCH:    mips.perf       8, 511(a0)
+entry:
+  %a.addr = alloca ptr, align 8
+  store ptr %a, ptr %a.addr, align 8
+  %0 = load ptr, ptr %a.addr, align 8
+  %arrayidx = getelementptr inbounds i8, ptr %0, i64 511
+  call void @llvm.prefetch.p0(ptr %arrayidx, i32 0, i32 0, i32 1)
+  ret void
+}
+
+declare void @llvm.prefetch.p0(ptr readonly captures(none), i32 immarg, i32 
immarg, i32 immarg) 
----------------
mshockwave wrote:

declaring intrinsics is no longer mandatory, so you can remove this line.

https://github.com/llvm/llvm-project/pull/145647
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to