Issue 127316
Summary [libclc] `clspv*` tests are failing
Labels new issue
Assignees frasercrmck
Reporter mgorny
    As of c30a7f459452d5766da244564bc1d5888346c364:

```
$ ninja test
[0/1] Running tests...
Test project /home/mgorny/git/llvm-project/libclc/build
 Start  1: external-calls-tahiti-amdgcn--.bc
 1/11 Test  #1: external-calls-tahiti-amdgcn--.bc .............   Passed    2.40 sec
 Start  2: external-calls-amdgcn--amdhsa.bc
 2/11 Test  #2: external-calls-amdgcn--amdhsa.bc ..............   Passed    2.47 sec
 Start  3: external-calls-tahiti-amdgcn-mesa-mesa3d.bc
 3/11 Test  #3: external-calls-tahiti-amdgcn-mesa-mesa3d.bc ...   Passed    2.42 sec
 Start  4: external-calls-clspv--.bc
 4/11 Test  #4: external-calls-clspv--.bc .....................***Failed    0.20 sec
 Start  5: external-calls-clspv64--.bc
 5/11 Test  #5: external-calls-clspv64--.bc ...................***Failed    0.20 sec
 Start  6: external-calls-nvptx--nvidiacl.bc
 6/11 Test  #6: external-calls-nvptx--nvidiacl.bc .............   Passed    1.93 sec
 Start  7: external-calls-nvptx64--nvidiacl.bc
 7/11 Test  #7: external-calls-nvptx64--nvidiacl.bc ...........   Passed    1.94 sec
 Start  8: external-calls-cedar-r600--.bc
 8/11 Test  #8: external-calls-cedar-r600--.bc ................   Passed    0.93 sec
 Start  9: external-calls-cypress-r600--.bc
 9/11 Test  #9: external-calls-cypress-r600--.bc ..............   Passed    0.90 sec
 Start 10: external-calls-barts-r600--.bc
10/11 Test #10: external-calls-barts-r600--.bc ................   Passed    0.92 sec
 Start 11: external-calls-cayman-r600--.bc
11/11 Test #11: external-calls-cayman-r600--.bc ...............   Passed    0.90 sec

82% tests passed, 2 tests failed out of 11

Total Test time (real) =  15.21 sec

The following tests FAILED:
	  4 - external-calls-clspv--.bc (Failed)
	  5 - external-calls-clspv64--.bc (Failed)
Errors while running CTest
Output from these tests are in: /home/mgorny/git/llvm-project/libclc/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
FAILED: CMakeFiles/test.util 
cd /home/mgorny/git/llvm-project/libclc/build && /usr/bin/ctest --force-new-ctest-process
ninja: build stopped: subcommand failed.
```

LastTest.log: [LastTest.log](https://github.com/user-attachments/files/18810206/LastTest.log)

Basically, they seem to boil down to:

```
ERROR: 17977 unresolved calls detected in /home/mgorny/git/llvm-project/libclc/build/clspv--.bc
ERROR: 17977 unresolved calls detected in /home/mgorny/git/llvm-project/libclc/build/clspv64--.bc

```

<details>
<summary>Full build log</summary>

```
$ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
-- The CXX compiler identification is GNU 14.2.1
-- The C compiler identification is GNU 14.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib64/libffi.so
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Found LibEdit: /usr/include (found version "2.11")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.3.1")
-- Found zstd: /usr/lib64/libzstd.so
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.13.5")
-- Linker detection: GNU ld
-- libclc LLVM version: 21.0.0git2cd8207b
-- Found Python3: /usr/bin/python3.13 (found version "3.13.2") found components: Interpreter
-- libclc target 'amdgcn--' is enabled
--   device: tahiti ( pitcairn;verde;oland;hainan;bonaire;kabini;kaveri;hawaii;mullins;tonga;tongapro;iceland;carrizo;fiji;stoney;polaris10;polaris11;gfx602;gfx705;gfx805;gfx900;gfx902;gfx904;gfx906;gfx908;gfx909;gfx90a;gfx90c;gfx940;gfx941;gfx942;gfx1010;gfx1011;gfx1012;gfx1013;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201 )
-- libclc target 'amdgcn--amdhsa' is enabled
--   device: none (  )
-- libclc target 'amdgcn-mesa-mesa3d' is enabled
--   device: tahiti ( pitcairn;verde;oland;hainan;bonaire;kabini;kaveri;hawaii;mullins;tonga;tongapro;iceland;carrizo;fiji;stoney;polaris10;polaris11;gfx602;gfx705;gfx805;gfx900;gfx902;gfx904;gfx906;gfx908;gfx909;gfx90a;gfx90c;gfx940;gfx941;gfx942;gfx1010;gfx1011;gfx1012;gfx1013;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201 )
-- libclc target 'clspv--' is enabled
--   device: none (  )
-- libclc target 'clspv64--' is enabled
--   device: none (  )
-- libclc target 'nvptx--' is enabled
--   device: none (  )
-- libclc target 'nvptx--nvidiacl' is enabled
--   device: none (  )
-- libclc target 'nvptx64--' is enabled
--   device: none (  )
-- libclc target 'nvptx64--nvidiacl' is enabled
--   device: none (  )
-- libclc target 'r600--' is enabled
--   device: cedar ( palm;sumo;sumo2;redwood;juniper )
--   device: cypress ( hemlock )
--   device: barts ( turks;caicos )
-- device: cayman ( aruba )
-- Configuring done (1.1s)
-- Generating done (0.8s)
-- Build files have been written to: /home/mgorny/git/llvm-project/libclc/build
$ ninja
[1779/3520] Generating builtins.link.pre-deps.tahiti-amdgcn--.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/tahiti-amdgcn--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/tahiti-amdgcn--/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll.bc' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/tahiti-amdgcn--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

[2053/3520] Generating builtins.link.pre-deps.tahiti-amdgcn-mesa-mesa3d.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/tahiti-amdgcn-mesa-mesa3d/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/tahiti-amdgcn-mesa-mesa3d/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll.bc' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/tahiti-amdgcn-mesa-mesa3d/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

[3358/3520] Generating builtins.link.pre-deps.cypress-r600--.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/cypress-r600--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/cypress-r600--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

[3359/3520] Generating builtins.link.pre-deps.cedar-r600--.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/cedar-r600--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/cedar-r600--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

[3360/3520] Generating builtins.link.pre-deps.cayman-r600--.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/cayman-r600--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/cayman-r600--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

[3361/3520] Generating builtins.link.pre-deps.barts-r600--.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/barts-r600--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/barts-r600--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1'

[3366/3520] Generating builtins.link.pre-deps.nvptx64--.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx64--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx64--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

[3367/3520] Generating builtins.link.pre-deps.nvptx--.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx--/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx--/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

[3371/3520] Generating builtins.link.pre-deps.amdgcn--amdhsa.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/amdgcn--amdhsa/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/amdgcn--amdhsa/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll.bc' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/amdgcn--amdhsa/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9'

[3373/3520] Generating builtins.link.pre-deps.nvptx--nvidiacl.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx--nvidiacl/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx--nvidiacl/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p:32:32-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

[3376/3520] Generating builtins.link.pre-deps.nvptx64--nvidiacl.bc
warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx64--nvidiacl/generic/lib/subnormal_use_default.ll.bc' is '' whereas 'llvm-link' is 'e-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

warning: Linking two modules of different data layouts: '/home/mgorny/git/llvm-project/libclc/build/obj.libclc.dir/nvptx64--nvidiacl/generic/lib/subnormal_helper_func.ll.bc' is '' whereas 'llvm-link' is 'e-p6:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64'

[3379/3520] Generating builtins.opt.clspv--.bc
/usr/lib/llvm/21/bin/opt: WARNING: failed to create target machine for 'spir-unknown-unknown': unable to get target for 'spir-unknown-unknown', see --version and --triple.
[3382/3520] Generating builtins.opt.clspv64--.bc
/usr/lib/llvm/21/bin/opt: WARNING: failed to create target machine for 'spir64-unknown-unknown': unable to get target for 'spir64-unknown-unknown', see --version and --triple.
[3520/3520] Generating gfx1201-amdgcn-mesa-mesa3d.bc
```
</details>
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to