brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 2cfe9d5 Raw
67 lines · plain
1;RUN: llc < %s -mtriple=r600 -mcpu=redwood | FileCheck %s2 3; CHECK-LABEL: {{^}}main:4; CHECK: ADD *5 6define amdgpu_vs void @main(<4 x float> inreg %reg0, <4 x float> inreg %reg1, <4 x float> inreg %reg2) {7main_body:8  %0 = extractelement <4 x float> %reg1, i32 09  %1 = extractelement <4 x float> %reg1, i32 110  %2 = extractelement <4 x float> %reg1, i32 211  %3 = extractelement <4 x float> %reg1, i32 312  %4 = extractelement <4 x float> %reg2, i32 013  %5 = fadd float %0, 2.014  %6 = fadd float %1, 3.015  %7 = fadd float %2, 4.016  %8 = fadd float %3, 5.017  %9 = bitcast float %4 to i3218  %10 = mul i32 %9, 619  %11 = bitcast i32 %10 to float20  %12 = insertelement <4 x float> poison, float %5, i32 021  %13 = insertelement <4 x float> %12, float %6, i32 122  %14 = insertelement <4 x float> %13, float %7, i32 223  %15 = insertelement <4 x float> %14, float %8, i32 324  %16 = insertelement <4 x float> %15, float %11, i32 325 26  %17 = call float @llvm.r600.dot4(<4 x float> %15,<4 x float> %16)27  %18 = insertelement <4 x float> poison, float %17, i32 028  call void @llvm.r600.store.swizzle(<4 x float> %18, i32 0, i32 2)29  ret void30}31 32; CHECK-LABEL: {{^}}main2:33; CHECK-NOT: ADD *34 35define amdgpu_vs void @main2(<4 x float> inreg %reg0, <4 x float> inreg %reg1, <4 x float> inreg %reg2) {36main_body:37  %0 = extractelement <4 x float> %reg1, i32 038  %1 = extractelement <4 x float> %reg1, i32 139  %2 = extractelement <4 x float> %reg1, i32 240  %3 = extractelement <4 x float> %reg1, i32 341  %4 = extractelement <4 x float> %reg2, i32 042  %5 = fadd float %0, 2.043  %6 = fadd float %1, 3.044  %7 = fadd float %2, 4.045  %8 = fadd float %3, 2.046  %9 = bitcast float %4 to i3247  %10 = mul i32 %9, 648  %11 = bitcast i32 %10 to float49  %12 = insertelement <4 x float> poison, float %5, i32 050  %13 = insertelement <4 x float> %12, float %6, i32 151  %14 = insertelement <4 x float> %13, float %7, i32 252  %15 = insertelement <4 x float> %14, float %8, i32 353  %16 = insertelement <4 x float> %15, float %11, i32 354 55  %17 = call float @llvm.r600.dot4(<4 x float> %15,<4 x float> %16)56  %18 = insertelement <4 x float> poison, float %17, i32 057  call void @llvm.r600.store.swizzle(<4 x float> %18, i32 0, i32 2)58  ret void59}60 61; Function Attrs: readnone62declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #163 64declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32)65 66attributes #1 = { readnone }67