1; RUN: llc -march=amdgcn -mcpu=SI < %s | FileCheck -check-prefix=SI %s 2; RUN: llc -march=amdgcn -mcpu=tonga < %s | FileCheck -check-prefix=SI %s 3 4; SI-LABEL: {{^}}no_reorder_v2f64_global_load_store: 5; SI: buffer_load_dwordx2 6; SI: buffer_load_dwordx2 7; SI: buffer_load_dwordx2 8; SI: buffer_load_dwordx2 9; SI: buffer_store_dwordx2 10; SI: buffer_store_dwordx2 11; SI: buffer_store_dwordx2 12; SI: buffer_store_dwordx2 13; SI: s_endpgm 14define void @no_reorder_v2f64_global_load_store(<2 x double> addrspace(1)* nocapture %x, <2 x double> addrspace(1)* nocapture %y) nounwind { 15 %tmp1 = load <2 x double>, <2 x double> addrspace(1)* %x, align 16 16 %tmp4 = load <2 x double>, <2 x double> addrspace(1)* %y, align 16 17 store <2 x double> %tmp4, <2 x double> addrspace(1)* %x, align 16 18 store <2 x double> %tmp1, <2 x double> addrspace(1)* %y, align 16 19 ret void 20} 21 22; SI-LABEL: {{^}}no_reorder_scalarized_v2f64_local_load_store: 23; SI: ds_read_b64 24; SI: ds_read_b64 25; SI: ds_write_b64 26; SI: ds_write_b64 27; SI: s_endpgm 28define void @no_reorder_scalarized_v2f64_local_load_store(<2 x double> addrspace(3)* nocapture %x, <2 x double> addrspace(3)* nocapture %y) nounwind { 29 %tmp1 = load <2 x double>, <2 x double> addrspace(3)* %x, align 16 30 %tmp4 = load <2 x double>, <2 x double> addrspace(3)* %y, align 16 31 store <2 x double> %tmp4, <2 x double> addrspace(3)* %x, align 16 32 store <2 x double> %tmp1, <2 x double> addrspace(3)* %y, align 16 33 ret void 34} 35 36; SI-LABEL: {{^}}no_reorder_split_v8i32_global_load_store: 37; SI: buffer_load_dword 38; SI: buffer_load_dword 39; SI: buffer_load_dword 40; SI: buffer_load_dword 41 42; SI: buffer_load_dword 43; SI: buffer_load_dword 44; SI: buffer_load_dword 45; SI: buffer_load_dword 46 47; SI: buffer_load_dword 48; SI: buffer_load_dword 49; SI: buffer_load_dword 50; SI: buffer_load_dword 51 52; SI: buffer_load_dword 53; SI: buffer_load_dword 54; SI: buffer_load_dword 55; SI: buffer_load_dword 56 57 58; SI: buffer_store_dword 59; SI: buffer_store_dword 60; SI: buffer_store_dword 61; SI: buffer_store_dword 62 63; SI: buffer_store_dword 64; SI: buffer_store_dword 65; SI: buffer_store_dword 66; SI: buffer_store_dword 67 68; SI: buffer_store_dword 69; SI: buffer_store_dword 70; SI: buffer_store_dword 71; SI: buffer_store_dword 72 73; SI: buffer_store_dword 74; SI: buffer_store_dword 75; SI: buffer_store_dword 76; SI: buffer_store_dword 77; SI: s_endpgm 78define void @no_reorder_split_v8i32_global_load_store(<8 x i32> addrspace(1)* nocapture %x, <8 x i32> addrspace(1)* nocapture %y) nounwind { 79 %tmp1 = load <8 x i32>, <8 x i32> addrspace(1)* %x, align 32 80 %tmp4 = load <8 x i32>, <8 x i32> addrspace(1)* %y, align 32 81 store <8 x i32> %tmp4, <8 x i32> addrspace(1)* %x, align 32 82 store <8 x i32> %tmp1, <8 x i32> addrspace(1)* %y, align 32 83 ret void 84} 85 86; SI-LABEL: {{^}}no_reorder_extload_64: 87; SI: ds_read_b64 88; SI: ds_read_b64 89; SI: ds_write_b64 90; SI-NOT: ds_read 91; SI: ds_write_b64 92; SI: s_endpgm 93define void @no_reorder_extload_64(<2 x i32> addrspace(3)* nocapture %x, <2 x i32> addrspace(3)* nocapture %y) nounwind { 94 %tmp1 = load <2 x i32>, <2 x i32> addrspace(3)* %x, align 8 95 %tmp4 = load <2 x i32>, <2 x i32> addrspace(3)* %y, align 8 96 %tmp1ext = zext <2 x i32> %tmp1 to <2 x i64> 97 %tmp4ext = zext <2 x i32> %tmp4 to <2 x i64> 98 %tmp7 = add <2 x i64> %tmp1ext, <i64 1, i64 1> 99 %tmp9 = add <2 x i64> %tmp4ext, <i64 1, i64 1> 100 %trunctmp9 = trunc <2 x i64> %tmp9 to <2 x i32> 101 %trunctmp7 = trunc <2 x i64> %tmp7 to <2 x i32> 102 store <2 x i32> %trunctmp9, <2 x i32> addrspace(3)* %x, align 8 103 store <2 x i32> %trunctmp7, <2 x i32> addrspace(3)* %y, align 8 104 ret void 105} 106