diff --git a/clang/test/CodeGen/attr-cpuspecific.c b/clang/test/CodeGen/attr-cpuspecific.c --- a/clang/test/CodeGen/attr-cpuspecific.c +++ b/clang/test/CodeGen/attr-cpuspecific.c @@ -63,18 +63,18 @@ // declaration. void TwoVersions(void); -ATTR(cpu_dispatch(ivybridge, knl)) +ATTR(cpu_dispatch(ivybridge, cannonlake)) void TwoVersions(void); // LINUX: define weak_odr ptr @TwoVersions.resolver() // LINUX: call void @__cpu_indicator_init -// LINUX: ret ptr @TwoVersions.Z +// LINUX: ret ptr @TwoVersions.e // LINUX: ret ptr @TwoVersions.S // LINUX: call void @llvm.trap // LINUX: unreachable // WINDOWS: define weak_odr dso_local void @TwoVersions() comdat // WINDOWS: call void @__cpu_indicator_init() -// WINDOWS: call void @TwoVersions.Z() +// WINDOWS: call void @TwoVersions.e() // WINDOWS-NEXT: ret void // WINDOWS: call void @TwoVersions.S() // WINDOWS-NEXT: ret void @@ -85,45 +85,45 @@ void TwoVersions(void){} // CHECK: define {{.*}}void @TwoVersions.S() #[[S]] -ATTR(cpu_specific(knl)) +ATTR(cpu_specific(cannonlake)) void TwoVersions(void){} -// CHECK: define {{.*}}void @TwoVersions.Z() #[[K:[0-9]+]] +// CHECK: define {{.*}}void @TwoVersions.e() #[[K:[0-9]+]] -ATTR(cpu_specific(ivybridge, knl)) +ATTR(cpu_specific(ivybridge, cannonlake)) void TwoVersionsSameAttr(void){} // CHECK: define {{.*}}void @TwoVersionsSameAttr.S() #[[S]] -// CHECK: define {{.*}}void @TwoVersionsSameAttr.Z() #[[K]] +// CHECK: define {{.*}}void @TwoVersionsSameAttr.e() #[[K]] -ATTR(cpu_specific(atom, ivybridge, knl)) +ATTR(cpu_specific(atom, ivybridge, cannonlake)) void ThreeVersionsSameAttr(void){} // CHECK: define {{.*}}void @ThreeVersionsSameAttr.O() #[[O:[0-9]+]] // CHECK: define {{.*}}void @ThreeVersionsSameAttr.S() #[[S]] -// CHECK: define {{.*}}void @ThreeVersionsSameAttr.Z() #[[K]] +// CHECK: define {{.*}}void @ThreeVersionsSameAttr.e() #[[K]] -ATTR(cpu_specific(knl)) +ATTR(cpu_specific(cannonlake)) void CpuSpecificNoDispatch(void) {} -// CHECK: define {{.*}}void @CpuSpecificNoDispatch.Z() #[[K:[0-9]+]] +// CHECK: define {{.*}}void @CpuSpecificNoDispatch.e() #[[K:[0-9]+]] -ATTR(cpu_dispatch(knl)) +ATTR(cpu_dispatch(cannonlake)) void OrderDispatchUsageSpecific(void); // LINUX: define weak_odr ptr @OrderDispatchUsageSpecific.resolver() // LINUX: call void @__cpu_indicator_init -// LINUX: ret ptr @OrderDispatchUsageSpecific.Z +// LINUX: ret ptr @OrderDispatchUsageSpecific.e // LINUX: call void @llvm.trap // LINUX: unreachable // WINDOWS: define weak_odr dso_local void @OrderDispatchUsageSpecific() comdat // WINDOWS: call void @__cpu_indicator_init() -// WINDOWS: call void @OrderDispatchUsageSpecific.Z() +// WINDOWS: call void @OrderDispatchUsageSpecific.e() // WINDOWS-NEXT: ret void // WINDOWS: call void @llvm.trap // WINDOWS: unreachable -// CHECK: define {{.*}}void @OrderDispatchUsageSpecific.Z() +// CHECK: define {{.*}}void @OrderDispatchUsageSpecific.e() -ATTR(cpu_specific(knl)) +ATTR(cpu_specific(cannonlake)) void OrderSpecificUsageDispatch(void) {} -// CHECK: define {{.*}}void @OrderSpecificUsageDispatch.Z() #[[K:[0-9]+]] +// CHECK: define {{.*}}void @OrderSpecificUsageDispatch.e() #[[K:[0-9]+]] void usages(void) { SingleVersion(); @@ -152,17 +152,17 @@ // LINUX: declare void @CpuSpecificNoDispatch.ifunc() // has an extra config to emit! -ATTR(cpu_dispatch(ivybridge, knl, atom)) +ATTR(cpu_dispatch(ivybridge, cannonlake, atom)) void TwoVersionsSameAttr(void); // LINUX: define weak_odr ptr @TwoVersionsSameAttr.resolver() -// LINUX: ret ptr @TwoVersionsSameAttr.Z +// LINUX: ret ptr @TwoVersionsSameAttr.e // LINUX: ret ptr @TwoVersionsSameAttr.S // LINUX: ret ptr @TwoVersionsSameAttr.O // LINUX: call void @llvm.trap // LINUX: unreachable // WINDOWS: define weak_odr dso_local void @TwoVersionsSameAttr() comdat -// WINDOWS: call void @TwoVersionsSameAttr.Z +// WINDOWS: call void @TwoVersionsSameAttr.e // WINDOWS-NEXT: ret void // WINDOWS: call void @TwoVersionsSameAttr.S // WINDOWS-NEXT: ret void @@ -171,11 +171,11 @@ // WINDOWS: call void @llvm.trap // WINDOWS: unreachable -ATTR(cpu_dispatch(atom, ivybridge, knl)) +ATTR(cpu_dispatch(atom, ivybridge, cannonlake)) void ThreeVersionsSameAttr(void){} // LINUX: define weak_odr ptr @ThreeVersionsSameAttr.resolver() // LINUX: call void @__cpu_indicator_init -// LINUX: ret ptr @ThreeVersionsSameAttr.Z +// LINUX: ret ptr @ThreeVersionsSameAttr.e // LINUX: ret ptr @ThreeVersionsSameAttr.S // LINUX: ret ptr @ThreeVersionsSameAttr.O // LINUX: call void @llvm.trap @@ -183,7 +183,7 @@ // WINDOWS: define weak_odr dso_local void @ThreeVersionsSameAttr() comdat // WINDOWS: call void @__cpu_indicator_init -// WINDOWS: call void @ThreeVersionsSameAttr.Z +// WINDOWS: call void @ThreeVersionsSameAttr.e // WINDOWS-NEXT: ret void // WINDOWS: call void @ThreeVersionsSameAttr.S // WINDOWS-NEXT: ret void @@ -192,22 +192,22 @@ // WINDOWS: call void @llvm.trap // WINDOWS: unreachable -ATTR(cpu_dispatch(knl)) +ATTR(cpu_dispatch(cannonlake)) void OrderSpecificUsageDispatch(void); // LINUX: define weak_odr ptr @OrderSpecificUsageDispatch.resolver() -// LINUX: ret ptr @OrderSpecificUsageDispatch.Z +// LINUX: ret ptr @OrderSpecificUsageDispatch.e // WINDOWS: define weak_odr dso_local void @OrderSpecificUsageDispatch() comdat // WINDOWS: call void @__cpu_indicator_init -// WINDOWS: call void @OrderSpecificUsageDispatch.Z +// WINDOWS: call void @OrderSpecificUsageDispatch.e // WINDOWS-NEXT: ret void // No Cpu Specific options. -ATTR(cpu_dispatch(atom, ivybridge, knl)) +ATTR(cpu_dispatch(atom, ivybridge, cannonlake)) void NoSpecifics(void); // LINUX: define weak_odr ptr @NoSpecifics.resolver() // LINUX: call void @__cpu_indicator_init -// LINUX: ret ptr @NoSpecifics.Z +// LINUX: ret ptr @NoSpecifics.e // LINUX: ret ptr @NoSpecifics.S // LINUX: ret ptr @NoSpecifics.O // LINUX: call void @llvm.trap @@ -215,7 +215,7 @@ // WINDOWS: define weak_odr dso_local void @NoSpecifics() comdat // WINDOWS: call void @__cpu_indicator_init -// WINDOWS: call void @NoSpecifics.Z +// WINDOWS: call void @NoSpecifics.e // WINDOWS-NEXT: ret void // WINDOWS: call void @NoSpecifics.S // WINDOWS-NEXT: ret void @@ -224,11 +224,11 @@ // WINDOWS: call void @llvm.trap // WINDOWS: unreachable -ATTR(cpu_dispatch(atom, generic, ivybridge, knl)) +ATTR(cpu_dispatch(atom, generic, ivybridge, cannonlake)) void HasGeneric(void); // LINUX: define weak_odr ptr @HasGeneric.resolver() // LINUX: call void @__cpu_indicator_init -// LINUX: ret ptr @HasGeneric.Z +// LINUX: ret ptr @HasGeneric.e // LINUX: ret ptr @HasGeneric.S // LINUX: ret ptr @HasGeneric.O // LINUX: ret ptr @HasGeneric.A @@ -236,7 +236,7 @@ // WINDOWS: define weak_odr dso_local void @HasGeneric() comdat // WINDOWS: call void @__cpu_indicator_init -// WINDOWS: call void @HasGeneric.Z +// WINDOWS: call void @HasGeneric.e // WINDOWS-NEXT: ret void // WINDOWS: call void @HasGeneric.S // WINDOWS-NEXT: ret void @@ -246,11 +246,11 @@ // WINDOWS-NEXT: ret void // WINDOWS-NOT: call void @llvm.trap -ATTR(cpu_dispatch(atom, generic, ivybridge, knl)) +ATTR(cpu_dispatch(atom, generic, ivybridge, cannonlake)) void HasParams(int i, double d); // LINUX: define weak_odr ptr @HasParams.resolver() // LINUX: call void @__cpu_indicator_init -// LINUX: ret ptr @HasParams.Z +// LINUX: ret ptr @HasParams.e // LINUX: ret ptr @HasParams.S // LINUX: ret ptr @HasParams.O // LINUX: ret ptr @HasParams.A @@ -258,7 +258,7 @@ // WINDOWS: define weak_odr dso_local void @HasParams(i32 %0, double %1) comdat // WINDOWS: call void @__cpu_indicator_init -// WINDOWS: call void @HasParams.Z(i32 %0, double %1) +// WINDOWS: call void @HasParams.e(i32 %0, double %1) // WINDOWS-NEXT: ret void // WINDOWS: call void @HasParams.S(i32 %0, double %1) // WINDOWS-NEXT: ret void @@ -268,11 +268,11 @@ // WINDOWS-NEXT: ret void // WINDOWS-NOT: call void @llvm.trap -ATTR(cpu_dispatch(atom, generic, ivybridge, knl)) +ATTR(cpu_dispatch(atom, generic, ivybridge, cannonlake)) int HasParamsAndReturn(int i, double d); // LINUX: define weak_odr ptr @HasParamsAndReturn.resolver() // LINUX: call void @__cpu_indicator_init -// LINUX: ret ptr @HasParamsAndReturn.Z +// LINUX: ret ptr @HasParamsAndReturn.e // LINUX: ret ptr @HasParamsAndReturn.S // LINUX: ret ptr @HasParamsAndReturn.O // LINUX: ret ptr @HasParamsAndReturn.A @@ -280,7 +280,7 @@ // WINDOWS: define weak_odr dso_local i32 @HasParamsAndReturn(i32 %0, double %1) comdat // WINDOWS: call void @__cpu_indicator_init -// WINDOWS: %[[RET:.+]] = musttail call i32 @HasParamsAndReturn.Z(i32 %0, double %1) +// WINDOWS: %[[RET:.+]] = musttail call i32 @HasParamsAndReturn.e(i32 %0, double %1) // WINDOWS-NEXT: ret i32 %[[RET]] // WINDOWS: %[[RET:.+]] = musttail call i32 @HasParamsAndReturn.S(i32 %0, double %1) // WINDOWS-NEXT: ret i32 %[[RET]] @@ -336,12 +336,12 @@ // WINDOWS: define dso_local i32 @DispatchFirst.B // WINDOWS: ret i32 1 -ATTR(cpu_specific(knl)) +ATTR(cpu_specific(cannonlake)) void OrderDispatchUsageSpecific(void) {} // CHECK: attributes #[[S]] = {{.*}}"target-features"="+avx,+cmov,+crc32,+cx8,+f16c,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" // CHECK-SAME: "tune-cpu"="ivybridge" -// CHECK: attributes #[[K]] = {{.*}}"target-features"="+adx,+avx,+avx2,+avx512cd,+avx512er,+avx512f,+avx512pf,+bmi,+cmov,+crc32,+cx8,+f16c,+fma,+lzcnt,+mmx,+movbe,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" -// CHECK-SAME: "tune-cpu"="knl" +// CHECK: attributes #[[K]] = {{.*}}"target-features"="+adx,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512ifma,+avx512vbmi,+avx512vl,+bmi,+cmov,+crc32,+cx8,+f16c,+fma,+lzcnt,+mmx,+movbe,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" +// CHECK-SAME: "tune-cpu"="cannonlake" // CHECK: attributes #[[O]] = {{.*}}"target-features"="+cmov,+cx8,+mmx,+movbe,+sse,+sse2,+sse3,+ssse3,+x87" // CHECK-SAME: "tune-cpu"="atom"