[IRLinker] Suppress linker warnings when linking with CUDA libdevice.
authorArtem Belevich <tra@google.com>
Fri, 27 Aug 2021 18:18:11 +0000 (11:18 -0700)
committerArtem Belevich <tra@google.com>
Wed, 1 Sep 2021 17:45:15 +0000 (10:45 -0700)
commit3af981b0659ffb2445dee60f1ec14ba417b7d9b1
treeb87b7112b43fd9a89dfd2893a46913ad8fc688c0
parent0922ce56f4f04fbcacead6cdf0416341fe44e4bb
[IRLinker] Suppress linker warnings when linking with CUDA libdevice.

libdevice bitcode provided by NVIDIA is linked with clang/LLVM-generated IR
which uses nvptx*-nvidia-cuda triple. We need to mark them as compatible.

Differential Revision: https://reviews.llvm.org/D108835
llvm/lib/Linker/IRMover.cpp
llvm/test/Linker/Inputs/libdevice-cuda-10.ll [new file with mode: 0644]
llvm/test/Linker/Inputs/libdevice-cuda-11.ll [new file with mode: 0644]
llvm/test/Linker/Inputs/libdevice-cuda-9.ll [new file with mode: 0644]
llvm/test/Linker/Inputs/not-a-libdevice.ll [new file with mode: 0644]
llvm/test/Linker/cuda-libdevice.ll [new file with mode: 0644]