1; RUN: opt -mtriple x86_64-- -load-store-vectorizer < %s -S | FileCheck %s
2
3%struct_render_pipeline_state = type opaque
4
5define fastcc void @test1(%struct_render_pipeline_state addrspace(1)* %pso) unnamed_addr {
6; CHECK-LABEL: @test1
7; CHECK: load i16
8; CHECK: load i16
9entry:
10  %tmp = bitcast %struct_render_pipeline_state addrspace(1)* %pso to i16 addrspace(1)*
11  %tmp1 = load i16, i16 addrspace(1)* %tmp, align 2
12  %tmp2 = bitcast %struct_render_pipeline_state addrspace(1)* %pso to i8 addrspace(1)*
13  %sunkaddr51 = getelementptr i8, i8 addrspace(1)* %tmp2, i64 6
14  %tmp3 = bitcast i8 addrspace(1)* %sunkaddr51 to i16 addrspace(1)*
15  %tmp4 = load i16, i16 addrspace(1)* %tmp3, align 2
16  ret void
17}
18
19define fastcc void @test2(%struct_render_pipeline_state addrspace(1)* %pso) unnamed_addr {
20; CHECK-LABEL: @test2
21; CHECK: load <2 x i16>
22entry:
23  %tmp = bitcast %struct_render_pipeline_state addrspace(1)* %pso to i16 addrspace(1)*
24  %tmp1 = load i16, i16 addrspace(1)* %tmp, align 2
25  %tmp2 = bitcast %struct_render_pipeline_state addrspace(1)* %pso to i8 addrspace(1)*
26  %sunkaddr51 = getelementptr i8, i8 addrspace(1)* %tmp2, i64 2
27  %tmp3 = bitcast i8 addrspace(1)* %sunkaddr51 to i16 addrspace(1)*
28  %tmp4 = load i16, i16 addrspace(1)* %tmp3, align 2
29  ret void
30}
31