brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · f860b03 Raw
76 lines · plain
1; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes=inline < %s | FileCheck %s2; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes='cgscc(inline)' < %s | FileCheck %s3 4; CHECK-LABEL: @func_no_target_cpu(5define i32 @func_no_target_cpu() #0 {6  ret i32 07}8 9; CHECK-LABEL: @target_cpu_call_no_target_cpu(10; CHECK-NEXT: ret i32 011define i32 @target_cpu_call_no_target_cpu() #1 {12  %call = call i32 @func_no_target_cpu()13  ret i32 %call14}15 16; CHECK-LABEL: @target_cpu_target_features_call_no_target_cpu(17; CHECK-NEXT: ret i32 018define i32 @target_cpu_target_features_call_no_target_cpu() {19  %call = call i32 @func_no_target_cpu()20  ret i32 %call21}22 23; Make sure gfx9 can call unspecified functions because of movrel24; feature change.25; CHECK-LABEL: @gfx9_target_features_call_no_target_cpu(26; CHECK-NEXT: ret i32 027define i32 @gfx9_target_features_call_no_target_cpu() #2 {28  %call = call i32 @func_no_target_cpu()29  ret i32 %call30}31 32define i32 @func_no_halfrate64ops() #3 {33  ret i32 034}35 36define i32 @func_with_halfrate64ops() #4 {37  ret i32 038}39 40; CHECK-LABEL: @call_func_without_halfrate64ops(41; CHECK-NEXT: ret i32 042define i32 @call_func_without_halfrate64ops() #4 {43  %call = call i32 @func_no_halfrate64ops()44  ret i32 %call45}46 47; CHECK-LABEL: @call_func_with_halfrate64ops(48; CHECK-NEXT: ret i32 049define i32 @call_func_with_halfrate64ops() #3 {50  %call = call i32 @func_with_halfrate64ops()51  ret i32 %call52}53 54define i32 @func_no_loadstoreopt() #5 {55  ret i32 056}57 58define i32 @func_with_loadstoreopt() #6 {59  ret i32 060}61 62; CHECK-LABEL: @call_func_without_loadstoreopt(63; CHECK-NEXT: ret i32 064define i32 @call_func_without_loadstoreopt() #6 {65  %call = call i32 @func_no_loadstoreopt()66  ret i32 %call67}68 69attributes #0 = { nounwind }70attributes #1 = { nounwind "target-cpu"="fiji" }71attributes #2 = { nounwind "target-cpu"="gfx900" }72attributes #3 = { nounwind "target-features"="-half-rate-64-ops" }73attributes #4 = { nounwind "target-features"="+half-rate-64-ops" }74attributes #5 = { nounwind "target-features"="-load-store-opt" }75attributes #6 = { nounwind "target-features"="+load-store-opt" }76