1; RUN: llc -march=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GCN,NO-ECC %s
2; RUN: llc -march=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefixes=GCN,NO-ECC %s
3; RUN: llc -march=amdgcn -mcpu=gfx904 -mattr=+sramecc < %s | FileCheck -check-prefixes=GCN,NO-ECC %s
4; RUN: llc -march=amdgcn -mcpu=gfx906 -mattr=+sramecc < %s | FileCheck -check-prefixes=GCN,ECC %s
5; RUN: llc -march=amdgcn -mcpu=gfx906 -mattr=-sramecc < %s | FileCheck -check-prefixes=GCN,NO-ECC %s
6
7; Make sure the correct set of targets are marked with
8; FeatureDoesNotSupportSRAMECC, and +sram-ecc is ignored if it's never
9; supported.
10
11; GCN-LABEL: {{^}}load_global_hi_v2i16_reglo_vreg:
12; NO-ECC: global_load_short_d16_hi
13; ECC: global_load_ushort
14define void @load_global_hi_v2i16_reglo_vreg(i16 addrspace(1)* %in, i16 %reg) {
15entry:
16  %gep = getelementptr inbounds i16, i16 addrspace(1)* %in, i64 -2047
17  %load = load i16, i16 addrspace(1)* %gep
18  %build0 = insertelement <2 x i16> undef, i16 %reg, i32 0
19  %build1 = insertelement <2 x i16> %build0, i16 %load, i32 1
20  store <2 x i16> %build1, <2 x i16> addrspace(1)* undef
21  ret void
22}
23