[PATCH] D142506: [AMDGCN] Fix device lib test to work with lib64

Siu Chi Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 24 14:17:52 PST 2023


scchan created this revision.
scchan added reviewers: yaxunl, mgorny.
Herald added subscribers: kosarev, jvesely.
Herald added a project: All.
scchan requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.

Change-Id: I8b2ae01899214aef63f4e593c3a509dbf54582ef


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142506

Files:
  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
  clang/test/Driver/hip-device-libs.hip


Index: clang/test/Driver/hip-device-libs.hip
===================================================================
--- clang/test/Driver/hip-device-libs.hip
+++ 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"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142506.491911.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230124/d3956f7b/attachment.bin>


More information about the cfe-commits mailing list