32 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=attributes --test FileCheck --test-arg --check-prefix=INTERESTING --test-arg %s --test-arg --input-file %s -o %t2; RUN: FileCheck --check-prefixes=RESULT %s < %t3 4; Test that convergent attributes are reduced if convergencectrl5; bundles are not used6 7; INTERESTING-LABEL: define float @convergent_intrinsic(8; RESULT-LABEL: define float @convergent_intrinsic(float %x, float %y) {9define float @convergent_intrinsic(float %x, float %y) #0 {10 %val = call float @llvm.amdgcn.readfirstlane.f32(float %x)11 ret float %val12}13 14; INTERESTING-LABEL: define float @convergent_func_no_convergent_intrinsics(15; RESULT-LABEL: define float @convergent_func_no_convergent_intrinsics(float %x, float %y) {16define float @convergent_func_no_convergent_intrinsics(float %x, float %y) #0 {17 %val = call float @extern.func(float %x, float %y)18 ret float %val19}20 21 22; RESULT-LABEL: declare float @convergent.extern.func(float, float){{$}}23declare float @convergent.extern.func(float, float) #024declare float @extern.func(float, float)25declare float @llvm.amdgcn.readfirstlane.f32(float) #126 27; RESULT: attributes #0 = { convergent nocallback nofree nounwind willreturn memory(none) }28; RESULT-NOT: attributes29 30attributes #0 = { convergent nounwind }31attributes #1 = { convergent nocallback nofree nounwind willreturn memory(none) }32