CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
157 lines
7.2 KiB
C++
157 lines
7.2 KiB
C++
// RUN: rm -rf %t
|
|
// RUN: cd %S
|
|
// REQUIRES: x86-registered-target
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -emit-module -fmodule-name=foo -o %t/foo.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 \
|
|
// RUN: Inputs/merge-target-features/module.modulemap
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -emit-module -fmodule-name=foo -o %t/foo-double.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 -target-feature +sse2 \
|
|
// RUN: Inputs/merge-target-features/module.modulemap
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -emit-module -fmodule-name=foo -o %t/foo-plusminus.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 -target-feature -sse2 \
|
|
// RUN: Inputs/merge-target-features/module.modulemap
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -emit-module -fmodule-name=foo -o %t/foo-minusplus.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature -sse2 -target-feature +sse2 \
|
|
// RUN: Inputs/merge-target-features/module.modulemap
|
|
//
|
|
// RUN: not %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=SUBSET --implicit-check-not=error: %s
|
|
// SUBSET: error: precompiled file '{{.*}}foo.pcm' was compiled with the target feature '+sse2' but the current translation unit is not
|
|
// SUBSET: error: {{.*}} configuration mismatch
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --allow-empty --check-prefix=SAME %s
|
|
// SAME-NOT: error:
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 -target-feature +sse3 \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --allow-empty --check-prefix=SUPERSET %s
|
|
// SUPERSET-NOT: error:
|
|
//
|
|
// RUN: not %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +cx16 \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --check-prefix=MISMATCH --implicit-check-not=error: %s
|
|
// MISMATCH: error: precompiled file '{{.*}}foo.pcm' was compiled with the target feature '+sse2' but the current translation unit is not
|
|
// MISMATCH: error: current translation unit is compiled with the target feature '+cx16' but the precompiled file '{{.*}}foo.pcm' was not
|
|
// MISMATCH: error: {{.*}} configuration mismatch
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo-double.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --allow-empty --check-prefix=DOUBLE %s
|
|
// DOUBLE-NOT: error:
|
|
//
|
|
// RUN: not %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo-plusminus.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --allow-empty --check-prefix=PLUSMINUS %s
|
|
// PLUSMINUS: error: precompiled file '{{.*}}foo-plusminus.pcm' was compiled with the target feature '-sse2' but the current translation unit is not
|
|
// PLUSMINUS: error: {{.*}} configuration mismatch
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo-minusplus.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --allow-empty --check-prefix=MINUSPLUS %s
|
|
// MINUSPLUS-NOT: error:
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 -target-feature invalid \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --allow-empty --check-prefix=IGNORED %s
|
|
// IGNORED-NOT: error:
|
|
//
|
|
// RUN: %clang_cc1 -fmodules -x c++ -fmodules-cache-path=%t \
|
|
// RUN: -iquote Inputs/merge-target-features \
|
|
// RUN: -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-map-file=Inputs/merge-target-features/module.modulemap \
|
|
// RUN: -fmodule-file=%t/foo.pcm \
|
|
// RUN: -triple i386-unknown-unknown \
|
|
// RUN: -target-cpu i386 -target-feature +sse2 -target-feature x \
|
|
// RUN: -fsyntax-only merge-target-features.cpp 2>&1 \
|
|
// RUN: | FileCheck --allow-empty --check-prefix=IGNORED2 %s
|
|
// IGNORED2-NOT: error:
|
|
|
|
#include "foo.h"
|
|
|
|
int test(int x) {
|
|
return foo(x);
|
|
}
|