Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 1 | ;RUN: llc < %s -march=r600 -mcpu=cayman |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 2 | |
Nicolai Haehnle | df3a20c | 2016-04-06 19:40:20 +0000 | [diff] [blame] | 3 | define amdgpu_vs void @main(<4 x float> inreg %reg0, <4 x float> inreg %reg1, <4 x float> inreg %reg2, <4 x float> inreg %reg3) { |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 4 | main_body: |
Vincent Lejeune | f143af3 | 2013-11-11 22:10:24 +0000 | [diff] [blame] | 5 | %0 = extractelement <4 x float> %reg1, i32 0 |
| 6 | %1 = extractelement <4 x float> %reg1, i32 1 |
| 7 | %2 = extractelement <4 x float> %reg1, i32 2 |
| 8 | %3 = extractelement <4 x float> %reg1, i32 3 |
| 9 | %4 = extractelement <4 x float> %reg2, i32 0 |
| 10 | %5 = extractelement <4 x float> %reg2, i32 1 |
| 11 | %6 = extractelement <4 x float> %reg2, i32 2 |
| 12 | %7 = extractelement <4 x float> %reg2, i32 3 |
| 13 | %8 = extractelement <4 x float> %reg3, i32 0 |
| 14 | %9 = extractelement <4 x float> %reg3, i32 1 |
| 15 | %10 = extractelement <4 x float> %reg3, i32 2 |
| 16 | %11 = extractelement <4 x float> %reg3, i32 3 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 17 | %12 = load <4 x float>, <4 x float> addrspace(8)* null |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 18 | %13 = extractelement <4 x float> %12, i32 0 |
| 19 | %14 = fmul float %0, %13 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 20 | %15 = load <4 x float>, <4 x float> addrspace(8)* null |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 21 | %16 = extractelement <4 x float> %15, i32 1 |
| 22 | %17 = fmul float %0, %16 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 23 | %18 = load <4 x float>, <4 x float> addrspace(8)* null |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 24 | %19 = extractelement <4 x float> %18, i32 2 |
| 25 | %20 = fmul float %0, %19 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 26 | %21 = load <4 x float>, <4 x float> addrspace(8)* null |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 27 | %22 = extractelement <4 x float> %21, i32 3 |
| 28 | %23 = fmul float %0, %22 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 29 | %24 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 30 | %25 = extractelement <4 x float> %24, i32 0 |
| 31 | %26 = fmul float %1, %25 |
| 32 | %27 = fadd float %26, %14 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 33 | %28 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 34 | %29 = extractelement <4 x float> %28, i32 1 |
| 35 | %30 = fmul float %1, %29 |
| 36 | %31 = fadd float %30, %17 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 37 | %32 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 38 | %33 = extractelement <4 x float> %32, i32 2 |
| 39 | %34 = fmul float %1, %33 |
| 40 | %35 = fadd float %34, %20 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 41 | %36 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 42 | %37 = extractelement <4 x float> %36, i32 3 |
| 43 | %38 = fmul float %1, %37 |
| 44 | %39 = fadd float %38, %23 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 45 | %40 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 2) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 46 | %41 = extractelement <4 x float> %40, i32 0 |
| 47 | %42 = fmul float %2, %41 |
| 48 | %43 = fadd float %42, %27 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 49 | %44 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 2) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 50 | %45 = extractelement <4 x float> %44, i32 1 |
| 51 | %46 = fmul float %2, %45 |
| 52 | %47 = fadd float %46, %31 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 53 | %48 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 2) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 54 | %49 = extractelement <4 x float> %48, i32 2 |
| 55 | %50 = fmul float %2, %49 |
| 56 | %51 = fadd float %50, %35 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 57 | %52 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 2) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 58 | %53 = extractelement <4 x float> %52, i32 3 |
| 59 | %54 = fmul float %2, %53 |
| 60 | %55 = fadd float %54, %39 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 61 | %56 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 3) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 62 | %57 = extractelement <4 x float> %56, i32 0 |
| 63 | %58 = fmul float %3, %57 |
| 64 | %59 = fadd float %58, %43 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 65 | %60 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 3) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 66 | %61 = extractelement <4 x float> %60, i32 1 |
| 67 | %62 = fmul float %3, %61 |
| 68 | %63 = fadd float %62, %47 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 69 | %64 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 3) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 70 | %65 = extractelement <4 x float> %64, i32 2 |
| 71 | %66 = fmul float %3, %65 |
| 72 | %67 = fadd float %66, %51 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 73 | %68 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 3) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 74 | %69 = extractelement <4 x float> %68, i32 3 |
| 75 | %70 = fmul float %3, %69 |
| 76 | %71 = fadd float %70, %55 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 77 | %72 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 4) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 78 | %73 = extractelement <4 x float> %72, i32 0 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 79 | %74 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 4) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 80 | %75 = extractelement <4 x float> %74, i32 1 |
David Blaikie | f72d05b | 2015-03-13 18:20:45 +0000 | [diff] [blame] | 81 | %76 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 4) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 82 | %77 = extractelement <4 x float> %76, i32 2 |
| 83 | %78 = insertelement <4 x float> undef, float %4, i32 0 |
| 84 | %79 = insertelement <4 x float> %78, float %5, i32 1 |
| 85 | %80 = insertelement <4 x float> %79, float %6, i32 2 |
| 86 | %81 = insertelement <4 x float> %80, float 0.000000e+00, i32 3 |
| 87 | %82 = insertelement <4 x float> undef, float %73, i32 0 |
| 88 | %83 = insertelement <4 x float> %82, float %75, i32 1 |
| 89 | %84 = insertelement <4 x float> %83, float %77, i32 2 |
| 90 | %85 = insertelement <4 x float> %84, float 0.000000e+00, i32 3 |
Matt Arsenault | ca7f570 | 2016-07-14 05:47:17 +0000 | [diff] [blame] | 91 | %86 = call float @llvm.r600.dot4(<4 x float> %81, <4 x float> %85) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 92 | %87 = insertelement <4 x float> undef, float %86, i32 0 |
Matt Arsenault | 82e5e1e | 2016-07-15 21:27:08 +0000 | [diff] [blame] | 93 | call void @llvm.r600.store.swizzle(<4 x float> %87, i32 2, i32 2) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 94 | ret void |
| 95 | } |
| 96 | |
| 97 | ; Function Attrs: readnone |
Matt Arsenault | ca7f570 | 2016-07-14 05:47:17 +0000 | [diff] [blame] | 98 | declare float @llvm.r600.dot4(<4 x float>, <4 x float>) #1 |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 99 | |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 100 | ; Function Attrs: nounwind readonly |
| 101 | declare float @llvm.pow.f32(float, float) #3 |
| 102 | |
Matt Arsenault | 82e5e1e | 2016-07-15 21:27:08 +0000 | [diff] [blame] | 103 | declare void @llvm.r600.store.swizzle(<4 x float>, i32, i32) |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 104 | |
Vincent Lejeune | d3fcb50 | 2013-05-17 16:51:06 +0000 | [diff] [blame] | 105 | attributes #1 = { readnone } |
| 106 | attributes #2 = { readonly } |
| 107 | attributes #3 = { nounwind readonly } |