llvm.org GIT mirror llvm / 3dd7164
Merging r226226: ------------------------------------------------------------------------ r226226 | Matthew.Arsenault | 2015-01-15 18:17:03 -0500 (Thu, 15 Jan 2015) | 5 lines R600/SI: Fix trailing comma with modifiers Instructions with 1 operand can still use source modifiers, so make sure we don't print an extra comma afterwards. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@226721 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 4 years ago
2 changed file(s) with 15 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
736736 // Returns the assembly string for the inputs and outputs of a VOP3
737737 // instruction.
738738 class getAsm64 {
739 string src0 = "$src0_modifiers,";
739 string src0 = !if(!eq(NumSrcArgs, 1), "$src0_modifiers", "$src0_modifiers,");
740740 string src1 = !if(!eq(NumSrcArgs, 1), "",
741741 !if(!eq(NumSrcArgs, 2), " $src1_modifiers",
742742 " $src1_modifiers,"));
0 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck %s --check-prefix=EG --check-prefix=FUNC
11 ; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck %s --check-prefix=SI --check-prefix=FUNC
22
3 declare float @llvm.fabs.f32(float) #0
4
35 ; FUNC-LABEL: {{^}}fp_to_sint_i32:
46 ; EG: FLT_TO_INT {{\** *}}T{{[0-9]+\.[XYZW], PV\.[XYZW]}}
57 ; SI: v_cvt_i32_f32_e32
68 ; SI: s_endpgm
7 define void @fp_to_sint_i32 (i32 addrspace(1)* %out, float %in) {
9 define void @fp_to_sint_i32(i32 addrspace(1)* %out, float %in) {
810 %conv = fptosi float %in to i32
11 store i32 %conv, i32 addrspace(1)* %out
12 ret void
13 }
14
15 ; FUNC-LABEL: {{^}}fp_to_sint_i32_fabs:
16 ; SI: v_cvt_i32_f32_e64 v{{[0-9]+}}, |s{{[0-9]+}}|{{$}}
17 define void @fp_to_sint_i32_fabs(i32 addrspace(1)* %out, float %in) {
18 %in.fabs = call float @llvm.fabs.f32(float %in) #0
19 %conv = fptosi float %in.fabs to i32
920 store i32 %conv, i32 addrspace(1)* %out
1021 ret void
1122 }
213224 store <4 x i64> %conv, <4 x i64> addrspace(1)* %out
214225 ret void
215226 }
227
228 attributes #0 = { nounwind readnone }