1 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=EG-CHECK 2 ; RUN: llc < %s -march=r600 -mcpu=cayman | FileCheck %s --check-prefix=EG-CHECK 3 ; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=SI-CHECK 4 5 ; EG-CHECK: @i8_arg 6 ; EG-CHECK: MOV {{[ *]*}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z 7 ; SI-CHECK: BUFFER_LOAD_UBYTE 8 9 define void @i8_arg(i32 addrspace(1)* nocapture %out, i8 %in) nounwind { 10 entry: 11 %0 = zext i8 %in to i32 12 store i32 %0, i32 addrspace(1)* %out, align 4 13 ret void 14 } 15 16 ; EG-CHECK: @i8_zext_arg 17 ; EG-CHECK: MOV {{[ *]*}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z 18 ; SI-CHECK: S_LOAD_DWORD SGPR{{[0-9]}}, SGPR0_SGPR1, 11 19 20 define void @i8_zext_arg(i32 addrspace(1)* nocapture %out, i8 zeroext %in) nounwind { 21 entry: 22 %0 = zext i8 %in to i32 23 store i32 %0, i32 addrspace(1)* %out, align 4 24 ret void 25 } 26 27 ; EG-CHECK: @i8_sext_arg 28 ; EG-CHECK: MOV {{[ *]*}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z 29 ; SI-CHECK: S_LOAD_DWORD SGPR{{[0-9]}}, SGPR0_SGPR1, 11 30 31 define void @i8_sext_arg(i32 addrspace(1)* nocapture %out, i8 signext %in) nounwind { 32 entry: 33 %0 = sext i8 %in to i32 34 store i32 %0, i32 addrspace(1)* %out, align 4 35 ret void 36 } 37 38 ; EG-CHECK: @i16_arg 39 ; EG-CHECK: MOV {{[ *]*}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z 40 ; SI-CHECK: BUFFER_LOAD_USHORT 41 42 define void @i16_arg(i32 addrspace(1)* nocapture %out, i16 %in) nounwind { 43 entry: 44 %0 = zext i16 %in to i32 45 store i32 %0, i32 addrspace(1)* %out, align 4 46 ret void 47 } 48 49 ; EG-CHECK: @i16_zext_arg 50 ; EG-CHECK: MOV {{[ *]*}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z 51 ; SI-CHECK: S_LOAD_DWORD SGPR{{[0-9]}}, SGPR0_SGPR1, 11 52 53 define void @i16_zext_arg(i32 addrspace(1)* nocapture %out, i16 zeroext %in) nounwind { 54 entry: 55 %0 = zext i16 %in to i32 56 store i32 %0, i32 addrspace(1)* %out, align 4 57 ret void 58 } 59 60 ; EG-CHECK: @i16_sext_arg 61 ; EG-CHECK: MOV {{[ *]*}}T{{[0-9]+\.[XYZW]}}, KC0[2].Z 62 ; SI-CHECK: S_LOAD_DWORD SGPR{{[0-9]}}, SGPR0_SGPR1, 11 63 64 define void @i16_sext_arg(i32 addrspace(1)* nocapture %out, i16 signext %in) nounwind { 65 entry: 66 %0 = sext i16 %in to i32 67 store i32 %0, i32 addrspace(1)* %out, align 4 68 ret void 69 } 70