1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -global-isel=0 -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-SDAG
3 ; RUN: llc < %s -global-isel=1 -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs | FileCheck %s -check-prefixes=GFX10,GFX10-GISEL
5 declare double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data)
6 declare double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data)
8 define amdgpu_cs void @global_atomic_fmin_f64_noret(ptr addrspace(1) %ptr, double %data) {
9 ; GFX10-LABEL: global_atomic_fmin_f64_noret:
11 ; GFX10-NEXT: global_atomic_fmin_x2 v[0:1], v[2:3], off
12 ; GFX10-NEXT: s_endpgm
13 %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data)
17 define amdgpu_cs void @global_atomic_fmax_f64_noret(ptr addrspace(1) %ptr, double %data) {
18 ; GFX10-LABEL: global_atomic_fmax_f64_noret:
20 ; GFX10-NEXT: global_atomic_fmax_x2 v[0:1], v[2:3], off
21 ; GFX10-NEXT: s_endpgm
22 %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data)
26 define amdgpu_cs void @global_atomic_fmin_f64_rtn(ptr addrspace(1) %ptr, double %data, ptr addrspace(1) %out) {
27 ; GFX10-LABEL: global_atomic_fmin_f64_rtn:
29 ; GFX10-NEXT: global_atomic_fmin_x2 v[0:1], v[0:1], v[2:3], off glc
30 ; GFX10-NEXT: s_waitcnt vmcnt(0)
31 ; GFX10-NEXT: global_store_dwordx2 v[4:5], v[0:1], off
32 ; GFX10-NEXT: s_endpgm
33 %ret = call double @llvm.amdgcn.global.atomic.fmin.f64.p1.f64(ptr addrspace(1) %ptr, double %data)
34 store double %ret, ptr addrspace(1) %out
38 define amdgpu_cs void @global_atomic_fmax_f64_rtn(ptr addrspace(1) %ptr, double %data, ptr addrspace(1) %out) {
39 ; GFX10-LABEL: global_atomic_fmax_f64_rtn:
41 ; GFX10-NEXT: global_atomic_fmax_x2 v[0:1], v[0:1], v[2:3], off glc
42 ; GFX10-NEXT: s_waitcnt vmcnt(0)
43 ; GFX10-NEXT: global_store_dwordx2 v[4:5], v[0:1], off
44 ; GFX10-NEXT: s_endpgm
45 %ret = call double @llvm.amdgcn.global.atomic.fmax.f64.p1.f64(ptr addrspace(1) %ptr, double %data)
46 store double %ret, ptr addrspace(1) %out
49 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: