1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
3 ; CHECK-SPIRV: OpName %[[#vec:]] "vec"
4 ; CHECK-SPIRV: OpName %[[#index:]] "index"
5 ; CHECK-SPIRV: OpName %[[#res:]] "res"
7 ; CHECK-SPIRV: %[[#float:]] = OpTypeFloat 32
8 ; CHECK-SPIRV: %[[#float2:]] = OpTypeVector %[[#float]] 2
10 ; CHECK-SPIRV: %[[#res]] = OpVectorExtractDynamic %[[#float]] %[[#vec]] %[[#index]]
12 define spir_kernel void @test(float addrspace(1)* nocapture %out, <2 x float> %vec, i32 %index) {
14 %res = extractelement <2 x float> %vec, i32 %index
15 store float %res, float addrspace(1)* %out, align 4