Index: lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h =================================================================== --- lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h +++ lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h @@ -83,6 +83,7 @@ AMDGPU::FeatureXNACK, AMDGPU::FeatureTrapHandler, AMDGPU::FeatureCodeObjectV3, + AMDGPU::FeatureSRAMECC, // Perf-tuning features AMDGPU::FeatureFastFMAF32, Index: test/Transforms/Inline/AMDGPU/inline-target-cpu.ll =================================================================== --- test/Transforms/Inline/AMDGPU/inline-target-cpu.ll +++ test/Transforms/Inline/AMDGPU/inline-target-cpu.ll @@ -89,6 +89,17 @@ ret i32 %call } +define i32 @sram_ecc_on() #12 { + ret i32 1 +} + +; CHECK-LABEL: @sram_ecc_off_calls_sram_ecc_on( +; CHECK-NEXT: ret i32 1 +define i32 @sram_ecc_off_calls_sram_ecc_on() #13 { + %call = call i32 @sram_ecc_on() + ret i32 %call +} + attributes #0 = { nounwind } attributes #1 = { nounwind "target-cpu"="fiji" } attributes #2 = { nounwind "target-cpu"="fiji" "target-features"="+fp32-denormals" } @@ -101,3 +112,5 @@ attributes #9 = { nounwind "target-features"="+load-store-opt" } attributes #10 = { nounwind "target-features"="+code-object-v3" } attributes #11 = { nounwind "target-features"="-code-object-v3" } +attributes #12 = { nounwind "target-features"="+sram-ecc" } +attributes #13 = { nounwind "target-features"="-sram-ecc" }