[llvm-branch-commits] [clang] 46d5a57 - [AMDGCN] Fix device lib test to work with lib64
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jan 26 15:01:03 PST 2023
Author: Siu Chi Chan
Date: 2023-01-26T14:57:21-08:00
New Revision: 46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d
URL: https://github.com/llvm/llvm-project/commit/46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d
DIFF: https://github.com/llvm/llvm-project/commit/46d5a57801bc37e5ebb1a4d6b2acc0fa99c01e8d.diff
LOG: [AMDGCN] Fix device lib test to work with lib64
This change fixes an issue introduced by
https://reviews.llvm.org/D140315. A new unit test was added to validate
the search for the device libraries being placed in Clang's resource
directory; however, the test didn't take into account that certain
platforms use lib64 for 64-bit library directory.
Differential Revision: https://reviews.llvm.org/D142506
Change-Id: I9c31a4f08fbc383350d82d6aba01987a3ef63e51
(cherry picked from commit 56184bb3ad3ff4f7ca00667ec4759648ce112269)
Added:
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/asanrtl.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/hip.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/ockl.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_abi_version_400.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_abi_version_500.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_daz_opt_off.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_daz_opt_on.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_finite_only_off.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_finite_only_on.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1010.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1011.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1012.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_803.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_900.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_908.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_unsafe_math_off.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_unsafe_math_on.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_wavefrontsize64_off.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_wavefrontsize64_on.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/ocml.bc
clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/opencl.bc
Modified:
clang/test/Driver/hip-device-libs.hip
Removed:
################################################################################
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/asanrtl.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/asanrtl.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/hip.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/hip.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/ockl.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/ockl.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_abi_version_400.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_abi_version_400.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_abi_version_500.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_abi_version_500.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_daz_opt_off.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_daz_opt_off.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_daz_opt_on.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_daz_opt_on.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_finite_only_off.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_finite_only_off.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_finite_only_on.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_finite_only_on.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1010.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1010.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1011.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1011.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1012.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_1012.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_803.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_803.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_900.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_900.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_908.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_isa_version_908.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_unsafe_math_off.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_unsafe_math_off.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_unsafe_math_on.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_unsafe_math_on.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_wavefrontsize64_off.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_wavefrontsize64_off.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_wavefrontsize64_on.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/oclc_wavefrontsize64_on.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/ocml.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/ocml.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/opencl.bc b/clang/test/Driver/Inputs/rocm_resource_dir/lib64/amdgcn/bitcode/opencl.bc
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/clang/test/Driver/hip-device-libs.hip b/clang/test/Driver/hip-device-libs.hip
index fe58cc9dbd9ac..06e1f724d6fb0 100644
--- a/clang/test/Driver/hip-device-libs.hip
+++ b/clang/test/Driver/hip-device-libs.hip
@@ -203,7 +203,7 @@
// ALL-NOT: error:
// ALL: {{"[^"]*clang[^"]*"}}
-// RESDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|\\\\)rocm_resource_dir(/|\\\\)lib(/|\\\\)amdgcn(/|\\\\).*]]hip.bc"
+// RESDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|\\\\)rocm_resource_dir(/|\\\\)lib(64)?(/|\\\\)amdgcn(/|\\\\).*]]hip.bc"
// ROCMDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|\\\\)rocm(/|\\\\)amdgcn(/|\\\\).*]]hip.bc"
// ALL-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR]]ocml.bc"
More information about the llvm-branch-commits
mailing list