Home | History | Annotate | Download | only in R600
      1 ;RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck %s
      2 
      3 ;CHECK-LABEL: @gather4_v2
      4 ;CHECK: IMAGE_GATHER4 {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
      5 define void @gather4_v2() #0 {
      6 main_body:
      7   %r = call <4 x float> @llvm.SI.gather4.v2i32(<2 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
      8   %r0 = extractelement <4 x float> %r, i32 0
      9   %r1 = extractelement <4 x float> %r, i32 1
     10   %r2 = extractelement <4 x float> %r, i32 2
     11   %r3 = extractelement <4 x float> %r, i32 3
     12   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
     13   ret void
     14 }
     15 
     16 ;CHECK-LABEL: @gather4
     17 ;CHECK: IMAGE_GATHER4 {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
     18 define void @gather4() #0 {
     19 main_body:
     20   %r = call <4 x float> @llvm.SI.gather4.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
     21   %r0 = extractelement <4 x float> %r, i32 0
     22   %r1 = extractelement <4 x float> %r, i32 1
     23   %r2 = extractelement <4 x float> %r, i32 2
     24   %r3 = extractelement <4 x float> %r, i32 3
     25   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
     26   ret void
     27 }
     28 
     29 ;CHECK-LABEL: @gather4_cl
     30 ;CHECK: IMAGE_GATHER4_CL {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
     31 define void @gather4_cl() #0 {
     32 main_body:
     33   %r = call <4 x float> @llvm.SI.gather4.cl.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
     34   %r0 = extractelement <4 x float> %r, i32 0
     35   %r1 = extractelement <4 x float> %r, i32 1
     36   %r2 = extractelement <4 x float> %r, i32 2
     37   %r3 = extractelement <4 x float> %r, i32 3
     38   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
     39   ret void
     40 }
     41 
     42 ;CHECK-LABEL: @gather4_l
     43 ;CHECK: IMAGE_GATHER4_L {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
     44 define void @gather4_l() #0 {
     45 main_body:
     46   %r = call <4 x float> @llvm.SI.gather4.l.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
     47   %r0 = extractelement <4 x float> %r, i32 0
     48   %r1 = extractelement <4 x float> %r, i32 1
     49   %r2 = extractelement <4 x float> %r, i32 2
     50   %r3 = extractelement <4 x float> %r, i32 3
     51   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
     52   ret void
     53 }
     54 
     55 ;CHECK-LABEL: @gather4_b
     56 ;CHECK: IMAGE_GATHER4_B {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
     57 define void @gather4_b() #0 {
     58 main_body:
     59   %r = call <4 x float> @llvm.SI.gather4.b.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
     60   %r0 = extractelement <4 x float> %r, i32 0
     61   %r1 = extractelement <4 x float> %r, i32 1
     62   %r2 = extractelement <4 x float> %r, i32 2
     63   %r3 = extractelement <4 x float> %r, i32 3
     64   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
     65   ret void
     66 }
     67 
     68 ;CHECK-LABEL: @gather4_b_cl
     69 ;CHECK: IMAGE_GATHER4_B_CL {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
     70 define void @gather4_b_cl() #0 {
     71 main_body:
     72   %r = call <4 x float> @llvm.SI.gather4.b.cl.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
     73   %r0 = extractelement <4 x float> %r, i32 0
     74   %r1 = extractelement <4 x float> %r, i32 1
     75   %r2 = extractelement <4 x float> %r, i32 2
     76   %r3 = extractelement <4 x float> %r, i32 3
     77   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
     78   ret void
     79 }
     80 
     81 ;CHECK-LABEL: @gather4_b_cl_v8
     82 ;CHECK: IMAGE_GATHER4_B_CL {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
     83 define void @gather4_b_cl_v8() #0 {
     84 main_body:
     85   %r = call <4 x float> @llvm.SI.gather4.b.cl.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
     86   %r0 = extractelement <4 x float> %r, i32 0
     87   %r1 = extractelement <4 x float> %r, i32 1
     88   %r2 = extractelement <4 x float> %r, i32 2
     89   %r3 = extractelement <4 x float> %r, i32 3
     90   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
     91   ret void
     92 }
     93 
     94 ;CHECK-LABEL: @gather4_lz_v2
     95 ;CHECK: IMAGE_GATHER4_LZ {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
     96 define void @gather4_lz_v2() #0 {
     97 main_body:
     98   %r = call <4 x float> @llvm.SI.gather4.lz.v2i32(<2 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
     99   %r0 = extractelement <4 x float> %r, i32 0
    100   %r1 = extractelement <4 x float> %r, i32 1
    101   %r2 = extractelement <4 x float> %r, i32 2
    102   %r3 = extractelement <4 x float> %r, i32 3
    103   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    104   ret void
    105 }
    106 
    107 ;CHECK-LABEL: @gather4_lz
    108 ;CHECK: IMAGE_GATHER4_LZ {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    109 define void @gather4_lz() #0 {
    110 main_body:
    111   %r = call <4 x float> @llvm.SI.gather4.lz.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    112   %r0 = extractelement <4 x float> %r, i32 0
    113   %r1 = extractelement <4 x float> %r, i32 1
    114   %r2 = extractelement <4 x float> %r, i32 2
    115   %r3 = extractelement <4 x float> %r, i32 3
    116   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    117   ret void
    118 }
    119 
    120 
    121 
    122 ;CHECK-LABEL: @gather4_o
    123 ;CHECK: IMAGE_GATHER4_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    124 define void @gather4_o() #0 {
    125 main_body:
    126   %r = call <4 x float> @llvm.SI.gather4.o.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    127   %r0 = extractelement <4 x float> %r, i32 0
    128   %r1 = extractelement <4 x float> %r, i32 1
    129   %r2 = extractelement <4 x float> %r, i32 2
    130   %r3 = extractelement <4 x float> %r, i32 3
    131   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    132   ret void
    133 }
    134 
    135 ;CHECK-LABEL: @gather4_cl_o
    136 ;CHECK: IMAGE_GATHER4_CL_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    137 define void @gather4_cl_o() #0 {
    138 main_body:
    139   %r = call <4 x float> @llvm.SI.gather4.cl.o.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    140   %r0 = extractelement <4 x float> %r, i32 0
    141   %r1 = extractelement <4 x float> %r, i32 1
    142   %r2 = extractelement <4 x float> %r, i32 2
    143   %r3 = extractelement <4 x float> %r, i32 3
    144   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    145   ret void
    146 }
    147 
    148 ;CHECK-LABEL: @gather4_cl_o_v8
    149 ;CHECK: IMAGE_GATHER4_CL_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    150 define void @gather4_cl_o_v8() #0 {
    151 main_body:
    152   %r = call <4 x float> @llvm.SI.gather4.cl.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    153   %r0 = extractelement <4 x float> %r, i32 0
    154   %r1 = extractelement <4 x float> %r, i32 1
    155   %r2 = extractelement <4 x float> %r, i32 2
    156   %r3 = extractelement <4 x float> %r, i32 3
    157   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    158   ret void
    159 }
    160 
    161 ;CHECK-LABEL: @gather4_l_o
    162 ;CHECK: IMAGE_GATHER4_L_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    163 define void @gather4_l_o() #0 {
    164 main_body:
    165   %r = call <4 x float> @llvm.SI.gather4.l.o.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    166   %r0 = extractelement <4 x float> %r, i32 0
    167   %r1 = extractelement <4 x float> %r, i32 1
    168   %r2 = extractelement <4 x float> %r, i32 2
    169   %r3 = extractelement <4 x float> %r, i32 3
    170   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    171   ret void
    172 }
    173 
    174 ;CHECK-LABEL: @gather4_l_o_v8
    175 ;CHECK: IMAGE_GATHER4_L_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    176 define void @gather4_l_o_v8() #0 {
    177 main_body:
    178   %r = call <4 x float> @llvm.SI.gather4.l.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    179   %r0 = extractelement <4 x float> %r, i32 0
    180   %r1 = extractelement <4 x float> %r, i32 1
    181   %r2 = extractelement <4 x float> %r, i32 2
    182   %r3 = extractelement <4 x float> %r, i32 3
    183   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    184   ret void
    185 }
    186 
    187 ;CHECK-LABEL: @gather4_b_o
    188 ;CHECK: IMAGE_GATHER4_B_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    189 define void @gather4_b_o() #0 {
    190 main_body:
    191   %r = call <4 x float> @llvm.SI.gather4.b.o.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    192   %r0 = extractelement <4 x float> %r, i32 0
    193   %r1 = extractelement <4 x float> %r, i32 1
    194   %r2 = extractelement <4 x float> %r, i32 2
    195   %r3 = extractelement <4 x float> %r, i32 3
    196   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    197   ret void
    198 }
    199 
    200 ;CHECK-LABEL: @gather4_b_o_v8
    201 ;CHECK: IMAGE_GATHER4_B_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    202 define void @gather4_b_o_v8() #0 {
    203 main_body:
    204   %r = call <4 x float> @llvm.SI.gather4.b.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    205   %r0 = extractelement <4 x float> %r, i32 0
    206   %r1 = extractelement <4 x float> %r, i32 1
    207   %r2 = extractelement <4 x float> %r, i32 2
    208   %r3 = extractelement <4 x float> %r, i32 3
    209   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    210   ret void
    211 }
    212 
    213 ;CHECK-LABEL: @gather4_b_cl_o
    214 ;CHECK: IMAGE_GATHER4_B_CL_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    215 define void @gather4_b_cl_o() #0 {
    216 main_body:
    217   %r = call <4 x float> @llvm.SI.gather4.b.cl.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    218   %r0 = extractelement <4 x float> %r, i32 0
    219   %r1 = extractelement <4 x float> %r, i32 1
    220   %r2 = extractelement <4 x float> %r, i32 2
    221   %r3 = extractelement <4 x float> %r, i32 3
    222   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    223   ret void
    224 }
    225 
    226 ;CHECK-LABEL: @gather4_lz_o
    227 ;CHECK: IMAGE_GATHER4_LZ_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    228 define void @gather4_lz_o() #0 {
    229 main_body:
    230   %r = call <4 x float> @llvm.SI.gather4.lz.o.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    231   %r0 = extractelement <4 x float> %r, i32 0
    232   %r1 = extractelement <4 x float> %r, i32 1
    233   %r2 = extractelement <4 x float> %r, i32 2
    234   %r3 = extractelement <4 x float> %r, i32 3
    235   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    236   ret void
    237 }
    238 
    239 
    240 
    241 ;CHECK-LABEL: @gather4_c
    242 ;CHECK: IMAGE_GATHER4_C {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    243 define void @gather4_c() #0 {
    244 main_body:
    245   %r = call <4 x float> @llvm.SI.gather4.c.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    246   %r0 = extractelement <4 x float> %r, i32 0
    247   %r1 = extractelement <4 x float> %r, i32 1
    248   %r2 = extractelement <4 x float> %r, i32 2
    249   %r3 = extractelement <4 x float> %r, i32 3
    250   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    251   ret void
    252 }
    253 
    254 ;CHECK-LABEL: @gather4_c_cl
    255 ;CHECK: IMAGE_GATHER4_C_CL {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    256 define void @gather4_c_cl() #0 {
    257 main_body:
    258   %r = call <4 x float> @llvm.SI.gather4.c.cl.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    259   %r0 = extractelement <4 x float> %r, i32 0
    260   %r1 = extractelement <4 x float> %r, i32 1
    261   %r2 = extractelement <4 x float> %r, i32 2
    262   %r3 = extractelement <4 x float> %r, i32 3
    263   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    264   ret void
    265 }
    266 
    267 ;CHECK-LABEL: @gather4_c_cl_v8
    268 ;CHECK: IMAGE_GATHER4_C_CL {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    269 define void @gather4_c_cl_v8() #0 {
    270 main_body:
    271   %r = call <4 x float> @llvm.SI.gather4.c.cl.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    272   %r0 = extractelement <4 x float> %r, i32 0
    273   %r1 = extractelement <4 x float> %r, i32 1
    274   %r2 = extractelement <4 x float> %r, i32 2
    275   %r3 = extractelement <4 x float> %r, i32 3
    276   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    277   ret void
    278 }
    279 
    280 ;CHECK-LABEL: @gather4_c_l
    281 ;CHECK: IMAGE_GATHER4_C_L {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    282 define void @gather4_c_l() #0 {
    283 main_body:
    284   %r = call <4 x float> @llvm.SI.gather4.c.l.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    285   %r0 = extractelement <4 x float> %r, i32 0
    286   %r1 = extractelement <4 x float> %r, i32 1
    287   %r2 = extractelement <4 x float> %r, i32 2
    288   %r3 = extractelement <4 x float> %r, i32 3
    289   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    290   ret void
    291 }
    292 
    293 ;CHECK-LABEL: @gather4_c_l_v8
    294 ;CHECK: IMAGE_GATHER4_C_L {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    295 define void @gather4_c_l_v8() #0 {
    296 main_body:
    297   %r = call <4 x float> @llvm.SI.gather4.c.l.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    298   %r0 = extractelement <4 x float> %r, i32 0
    299   %r1 = extractelement <4 x float> %r, i32 1
    300   %r2 = extractelement <4 x float> %r, i32 2
    301   %r3 = extractelement <4 x float> %r, i32 3
    302   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    303   ret void
    304 }
    305 
    306 ;CHECK-LABEL: @gather4_c_b
    307 ;CHECK: IMAGE_GATHER4_C_B {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    308 define void @gather4_c_b() #0 {
    309 main_body:
    310   %r = call <4 x float> @llvm.SI.gather4.c.b.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    311   %r0 = extractelement <4 x float> %r, i32 0
    312   %r1 = extractelement <4 x float> %r, i32 1
    313   %r2 = extractelement <4 x float> %r, i32 2
    314   %r3 = extractelement <4 x float> %r, i32 3
    315   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    316   ret void
    317 }
    318 
    319 ;CHECK-LABEL: @gather4_c_b_v8
    320 ;CHECK: IMAGE_GATHER4_C_B {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    321 define void @gather4_c_b_v8() #0 {
    322 main_body:
    323   %r = call <4 x float> @llvm.SI.gather4.c.b.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    324   %r0 = extractelement <4 x float> %r, i32 0
    325   %r1 = extractelement <4 x float> %r, i32 1
    326   %r2 = extractelement <4 x float> %r, i32 2
    327   %r3 = extractelement <4 x float> %r, i32 3
    328   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    329   ret void
    330 }
    331 
    332 ;CHECK-LABEL: @gather4_c_b_cl
    333 ;CHECK: IMAGE_GATHER4_C_B_CL {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    334 define void @gather4_c_b_cl() #0 {
    335 main_body:
    336   %r = call <4 x float> @llvm.SI.gather4.c.b.cl.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    337   %r0 = extractelement <4 x float> %r, i32 0
    338   %r1 = extractelement <4 x float> %r, i32 1
    339   %r2 = extractelement <4 x float> %r, i32 2
    340   %r3 = extractelement <4 x float> %r, i32 3
    341   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    342   ret void
    343 }
    344 
    345 ;CHECK-LABEL: @gather4_c_lz
    346 ;CHECK: IMAGE_GATHER4_C_LZ {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    347 define void @gather4_c_lz() #0 {
    348 main_body:
    349   %r = call <4 x float> @llvm.SI.gather4.c.lz.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    350   %r0 = extractelement <4 x float> %r, i32 0
    351   %r1 = extractelement <4 x float> %r, i32 1
    352   %r2 = extractelement <4 x float> %r, i32 2
    353   %r3 = extractelement <4 x float> %r, i32 3
    354   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    355   ret void
    356 }
    357 
    358 
    359 
    360 ;CHECK-LABEL: @gather4_c_o
    361 ;CHECK: IMAGE_GATHER4_C_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    362 define void @gather4_c_o() #0 {
    363 main_body:
    364   %r = call <4 x float> @llvm.SI.gather4.c.o.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    365   %r0 = extractelement <4 x float> %r, i32 0
    366   %r1 = extractelement <4 x float> %r, i32 1
    367   %r2 = extractelement <4 x float> %r, i32 2
    368   %r3 = extractelement <4 x float> %r, i32 3
    369   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    370   ret void
    371 }
    372 
    373 ;CHECK-LABEL: @gather4_c_o_v8
    374 ;CHECK: IMAGE_GATHER4_C_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    375 define void @gather4_c_o_v8() #0 {
    376 main_body:
    377   %r = call <4 x float> @llvm.SI.gather4.c.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    378   %r0 = extractelement <4 x float> %r, i32 0
    379   %r1 = extractelement <4 x float> %r, i32 1
    380   %r2 = extractelement <4 x float> %r, i32 2
    381   %r3 = extractelement <4 x float> %r, i32 3
    382   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    383   ret void
    384 }
    385 
    386 ;CHECK-LABEL: @gather4_c_cl_o
    387 ;CHECK: IMAGE_GATHER4_C_CL_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    388 define void @gather4_c_cl_o() #0 {
    389 main_body:
    390   %r = call <4 x float> @llvm.SI.gather4.c.cl.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    391   %r0 = extractelement <4 x float> %r, i32 0
    392   %r1 = extractelement <4 x float> %r, i32 1
    393   %r2 = extractelement <4 x float> %r, i32 2
    394   %r3 = extractelement <4 x float> %r, i32 3
    395   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    396   ret void
    397 }
    398 
    399 ;CHECK-LABEL: @gather4_c_l_o
    400 ;CHECK: IMAGE_GATHER4_C_L_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    401 define void @gather4_c_l_o() #0 {
    402 main_body:
    403   %r = call <4 x float> @llvm.SI.gather4.c.l.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    404   %r0 = extractelement <4 x float> %r, i32 0
    405   %r1 = extractelement <4 x float> %r, i32 1
    406   %r2 = extractelement <4 x float> %r, i32 2
    407   %r3 = extractelement <4 x float> %r, i32 3
    408   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    409   ret void
    410 }
    411 
    412 ;CHECK-LABEL: @gather4_c_b_o
    413 ;CHECK: IMAGE_GATHER4_C_B_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    414 define void @gather4_c_b_o() #0 {
    415 main_body:
    416   %r = call <4 x float> @llvm.SI.gather4.c.b.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    417   %r0 = extractelement <4 x float> %r, i32 0
    418   %r1 = extractelement <4 x float> %r, i32 1
    419   %r2 = extractelement <4 x float> %r, i32 2
    420   %r3 = extractelement <4 x float> %r, i32 3
    421   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    422   ret void
    423 }
    424 
    425 ;CHECK-LABEL: @gather4_c_b_cl_o
    426 ;CHECK: IMAGE_GATHER4_C_B_CL_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    427 define void @gather4_c_b_cl_o() #0 {
    428 main_body:
    429   %r = call <4 x float> @llvm.SI.gather4.c.b.cl.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    430   %r0 = extractelement <4 x float> %r, i32 0
    431   %r1 = extractelement <4 x float> %r, i32 1
    432   %r2 = extractelement <4 x float> %r, i32 2
    433   %r3 = extractelement <4 x float> %r, i32 3
    434   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    435   ret void
    436 }
    437 
    438 ;CHECK-LABEL: @gather4_c_lz_o
    439 ;CHECK: IMAGE_GATHER4_C_LZ_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    440 define void @gather4_c_lz_o() #0 {
    441 main_body:
    442   %r = call <4 x float> @llvm.SI.gather4.c.lz.o.v4i32(<4 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    443   %r0 = extractelement <4 x float> %r, i32 0
    444   %r1 = extractelement <4 x float> %r, i32 1
    445   %r2 = extractelement <4 x float> %r, i32 2
    446   %r3 = extractelement <4 x float> %r, i32 3
    447   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    448   ret void
    449 }
    450 
    451 ;CHECK-LABEL: @gather4_c_lz_o_v8
    452 ;CHECK: IMAGE_GATHER4_C_LZ_O {{v\[[0-9]+:[0-9]+\]}}, 1, 0, 0, -1, 0, 0, 0, 0, {{v\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}, {{s\[[0-9]+:[0-9]+\]}}
    453 define void @gather4_c_lz_o_v8() #0 {
    454 main_body:
    455   %r = call <4 x float> @llvm.SI.gather4.c.lz.o.v8i32(<8 x i32> undef, <32 x i8> undef, <16 x i8> undef, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0)
    456   %r0 = extractelement <4 x float> %r, i32 0
    457   %r1 = extractelement <4 x float> %r, i32 1
    458   %r2 = extractelement <4 x float> %r, i32 2
    459   %r3 = extractelement <4 x float> %r, i32 3
    460   call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %r0, float %r1, float %r2, float %r3)
    461   ret void
    462 }
    463 
    464 
    465 
    466 declare <4 x float> @llvm.SI.gather4.v2i32(<2 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    467 declare <4 x float> @llvm.SI.gather4.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    468 declare <4 x float> @llvm.SI.gather4.cl.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    469 declare <4 x float> @llvm.SI.gather4.l.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    470 declare <4 x float> @llvm.SI.gather4.b.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    471 declare <4 x float> @llvm.SI.gather4.b.cl.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    472 declare <4 x float> @llvm.SI.gather4.b.cl.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    473 declare <4 x float> @llvm.SI.gather4.lz.v2i32(<2 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    474 declare <4 x float> @llvm.SI.gather4.lz.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    475 
    476 declare <4 x float> @llvm.SI.gather4.o.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    477 declare <4 x float> @llvm.SI.gather4.cl.o.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    478 declare <4 x float> @llvm.SI.gather4.cl.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    479 declare <4 x float> @llvm.SI.gather4.l.o.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    480 declare <4 x float> @llvm.SI.gather4.l.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    481 declare <4 x float> @llvm.SI.gather4.b.o.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    482 declare <4 x float> @llvm.SI.gather4.b.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    483 declare <4 x float> @llvm.SI.gather4.b.cl.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    484 declare <4 x float> @llvm.SI.gather4.lz.o.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    485 
    486 declare <4 x float> @llvm.SI.gather4.c.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    487 declare <4 x float> @llvm.SI.gather4.c.cl.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    488 declare <4 x float> @llvm.SI.gather4.c.cl.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    489 declare <4 x float> @llvm.SI.gather4.c.l.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    490 declare <4 x float> @llvm.SI.gather4.c.l.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    491 declare <4 x float> @llvm.SI.gather4.c.b.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    492 declare <4 x float> @llvm.SI.gather4.c.b.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    493 declare <4 x float> @llvm.SI.gather4.c.b.cl.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    494 declare <4 x float> @llvm.SI.gather4.c.lz.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    495 
    496 declare <4 x float> @llvm.SI.gather4.c.o.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    497 declare <4 x float> @llvm.SI.gather4.c.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    498 declare <4 x float> @llvm.SI.gather4.c.cl.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    499 declare <4 x float> @llvm.SI.gather4.c.l.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    500 declare <4 x float> @llvm.SI.gather4.c.b.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    501 declare <4 x float> @llvm.SI.gather4.c.b.cl.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    502 declare <4 x float> @llvm.SI.gather4.c.lz.o.v4i32(<4 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    503 declare <4 x float> @llvm.SI.gather4.c.lz.o.v8i32(<8 x i32>, <32 x i8>, <16 x i8>, i32, i32, i32, i32, i32, i32, i32, i32) #1
    504 
    505 declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
    506 
    507 attributes #0 = { "ShaderType"="0" }
    508 attributes #1 = { nounwind readnone }
    509