blob: 442819ea20d04a54e226bf2f765af4aec6bb82ee [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-- -mattr=+prefetchi | FileCheck %s
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefix=NOPREFETCHI
define dso_local void @t(ptr %ptr) nounwind {
; CHECK-LABEL: t:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: prefetchit1 (%rdi)
; CHECK-NEXT: prefetchit0 (%rdi)
; CHECK-NEXT: prefetchit1 t(%rip)
; CHECK-NEXT: prefetchit0 ext(%rip)
; CHECK-NEXT: retq
;
; NOPREFETCHI-LABEL: t:
; NOPREFETCHI: # %bb.0: # %entry
; NOPREFETCHI-NEXT: retq
entry:
tail call void @llvm.prefetch(ptr %ptr, i32 0, i32 2, i32 0)
tail call void @llvm.prefetch(ptr %ptr, i32 0, i32 3, i32 0)
tail call void @llvm.prefetch(ptr @t, i32 0, i32 2, i32 0)
tail call void @llvm.prefetch(ptr @ext, i32 0, i32 3, i32 0)
ret void
}
declare dso_local void @ext() nounwind
declare void @llvm.prefetch(ptr, i32, i32, i32) nounwind