diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-11-22 22:59:45 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-11-29 04:55:33 -0600 |
commit | ca4ffd4ad4bd60d08cad71600134eb569872c2bc (patch) | |
tree | b0e2fd491304459d52af24856b5ef04fedcc4a69 | |
parent | fee7397fd3f6ca6cdd9936bc54ac394d5393a921 (diff) | |
download | packages-ca4ffd4ad4bd60d08cad71600134eb569872c2bc.tar.gz packages-ca4ffd4ad4bd60d08cad71600134eb569872c2bc.tar.bz2 packages-ca4ffd4ad4bd60d08cad71600134eb569872c2bc.tar.xz packages-ca4ffd4ad4bd60d08cad71600134eb569872c2bc.zip |
experimental/spirv-llvm-translator: New package
Does not work on big endian, despite faring slightly better with my patch.
Does not seem to work on 32-bit architectures; not investigated.
See-also: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/2397
-rw-r--r-- | experimental/spirv-llvm-translator/APKBUILD | 50 | ||||
-rw-r--r-- | experimental/spirv-llvm-translator/endian.patch | 37 | ||||
-rw-r--r-- | experimental/spirv-llvm-translator/test-triplet.patch | 700 |
3 files changed, 787 insertions, 0 deletions
diff --git a/experimental/spirv-llvm-translator/APKBUILD b/experimental/spirv-llvm-translator/APKBUILD new file mode 100644 index 000000000..f6dd0ff2e --- /dev/null +++ b/experimental/spirv-llvm-translator/APKBUILD @@ -0,0 +1,50 @@ +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=spirv-llvm-translator +pkgver=18.1.6 +_llvmver=$(echo $pkgver | cut -f1 -d.) +pkgrel=0 +pkgdesc="A tool and a library for bi-directional translation between SPIR-V and LLVM IR" +url=" " +arch="all" +license="NCSA" +depends="" +makedepends="cmake llvm${_llvmver}-dev spirv-headers spirv-tools-dev" +subpackages="$pkgname-dev" +source="SPIRV-LLVM-Translator-$pkgver.tar.gz::https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v$pkgver.tar.gz + endian.patch + test-triplet.patch + " +builddir="$srcdir/SPIRV-LLVM-Translator-$pkgver" + +build() { + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCCACHE_ALLOWED=OFF \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DLLVM_DIR=$(/usr/lib/llvm${_llvmver}/bin/llvm-config --cmakedir) \ + -DLLVM_EXTERNAL_LIT=/usr/bin/lit \ + -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \ + -DLLVM_SPIRV_INCLUDE_TESTS=ON \ + ${CMAKE_CROSSOPTS} \ + -Bbuild . + make -C build +} + +check() { + make -C build test +} + +package() { + make DESTDIR="$pkgdir" -C build install +} + +sha512sums="30d85fcd767cdae8b29f65dff50f2449e3421477634edcec67e88e92eeb77ec724c46eed4e90274d8697955c79fc26650c268839ed4612aee096b2d4707af728 SPIRV-LLVM-Translator-18.1.6.tar.gz +fd261c9bb17c1f322191375ebbbbf14ebb8c6ec36d777470e48a5856d936c63f7a3306784460ee903b18f97b34f5157a2590bcfd3c891ebe03ce865f7d5ee9f7 endian.patch +45d38dcf180113e2790b9a1fa3d1f7b24975b67e6976af71688bd6cbbd23e8e1cc792593f4612277bf6fee45e41a3047c62e3a69a218ee246f1494c9e1783665 test-triplet.patch" diff --git a/experimental/spirv-llvm-translator/endian.patch b/experimental/spirv-llvm-translator/endian.patch new file mode 100644 index 000000000..66a4e88bd --- /dev/null +++ b/experimental/spirv-llvm-translator/endian.patch @@ -0,0 +1,37 @@ +--- SPIRV-LLVM-Translator-18.1.6/lib/SPIRV/libSPIRV/SPIRVStream.h.old 2024-10-30 05:39:48.000000000 -0500 ++++ SPIRV-LLVM-Translator-18.1.6/lib/SPIRV/libSPIRV/SPIRVStream.h 2024-11-22 20:17:06.139226884 -0600 +@@ -43,6 +43,16 @@ + #include "SPIRVDebug.h" + #include "SPIRVExtInst.h" + #include "SPIRVModule.h" ++#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ++#include <byteswap.h> ++#define cpu_to_le32(x) __bswap32(x) ++#define le32_to_cpu(x) __bswap32(x) ++#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ++#define cpu_to_le32(x) x ++#define le32_to_cpu(x) x ++#else ++#error Endianness unknown (neither big nor little) ++#endif + #include <cctype> + #include <cstdint> + #include <iostream> +@@ -102,7 +112,7 @@ + const SPIRVDecoder &decodeBinary(const SPIRVDecoder &I, T &V) { + uint32_t W; + I.IS.read(reinterpret_cast<char *>(&W), sizeof(W)); +- V = static_cast<T>(W); ++ V = static_cast<T>(le32_to_cpu(W)); + SPIRVDBG(spvdbgs() << "Read word: W = " << W << " V = " << V << '\n'); + return I; + } +@@ -185,7 +195,7 @@ + return O; + } + #endif +- uint32_t W = static_cast<uint32_t>(V); ++ uint32_t W = cpu_to_le32(static_cast<uint32_t>(V)); + O.OS.write(reinterpret_cast<char *>(&W), sizeof(W)); + return O; + } diff --git a/experimental/spirv-llvm-translator/test-triplet.patch b/experimental/spirv-llvm-translator/test-triplet.patch new file mode 100644 index 000000000..e46ded389 --- /dev/null +++ b/experimental/spirv-llvm-translator/test-triplet.patch @@ -0,0 +1,700 @@ +Upstream-URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/2555 + +From 96a37c6090a8eda825f6870364a7feae858f7c39 Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Fri, 7 Jun 2024 17:33:18 -0400 +Subject: [PATCH] test: Fix x86 tests to use -mtriple=x86_64-unknown-linux-gnu + +... when test expects x86_64-specific results. +--- + test/DebugInfo/X86/abstract_origin.ll | 6 +++--- + test/DebugInfo/X86/constant-aggregate.ll | 6 +++--- + test/DebugInfo/X86/constant-loclist.ll | 6 +++--- + test/DebugInfo/X86/convert-debugloc.ll | 12 ++++++------ + test/DebugInfo/X86/dbg-byval-parameter.ll | 6 +++--- + test/DebugInfo/X86/dbg-declare-alloca.ll | 12 ++++++------ + test/DebugInfo/X86/dbg-declare-arg.ll | 6 +++--- + test/DebugInfo/X86/dbg-prolog-end.ll | 6 +++--- + test/DebugInfo/X86/dbg-value-const-byref.ll | 6 +++--- + test/DebugInfo/X86/dbg-value-isel.ll | 6 +++--- + test/DebugInfo/X86/dw_op_minus_direct.ll | 18 +++++++++--------- + .../X86/dwarf-aranges-no-dwarf-labels.ll | 6 +++--- + test/DebugInfo/X86/float_const.ll | 6 +++--- + test/DebugInfo/X86/frame-register.ll | 6 +++--- + test/DebugInfo/X86/inlined-formal-parameter.ll | 6 +++--- + test/DebugInfo/X86/isel-cse-line.ll | 6 +++--- + test/DebugInfo/X86/mixed-nodebug-cu.ll | 6 +++--- + test/DebugInfo/X86/nophysreg.ll | 6 +++--- + test/DebugInfo/X86/partial-constant.ll | 6 +++--- + test/DebugInfo/X86/single-dbg_value.ll | 12 ++++++------ + .../X86/split-dwarf-multiple-cu-hash.ll | 12 ++++++------ + test/DebugInfo/X86/split-dwarf-omit-empty.ll | 6 +++--- + test/DebugInfo/X86/static_member_array.ll | 6 +++--- + test/DebugInfo/X86/this-stack_value.ll | 12 ++++++------ + test/DebugInfo/X86/unattached-global.ll | 6 +++--- + test/DebugInfo/X86/union-const.ll | 6 +++--- + 26 files changed, 99 insertions(+), 99 deletions(-) + +diff --git a/test/DebugInfo/X86/abstract_origin.ll b/test/DebugInfo/X86/abstract_origin.ll +index 711a15efb5..48e08bf471 100644 +--- a/test/DebugInfo/X86/abstract_origin.ll ++++ b/test/DebugInfo/X86/abstract_origin.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - | llvm-dwarfdump -debug-info - | FileCheck %s + + ; Generated at -O2 from: + ; void f(); +diff --git a/test/DebugInfo/X86/constant-aggregate.ll b/test/DebugInfo/X86/constant-aggregate.ll +index 353b282913..739ac8cf85 100644 +--- a/test/DebugInfo/X86/constant-aggregate.ll ++++ b/test/DebugInfo/X86/constant-aggregate.ll +@@ -1,17 +1,17 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o %t.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o %t.o + ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o %t.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o %t.o + ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o %t.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o %t.o + ; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s + + ; Test emitting a constant for an aggregate type. +diff --git a/test/DebugInfo/X86/constant-loclist.ll b/test/DebugInfo/X86/constant-loclist.ll +index 6f7d5c9e49..ba82efc8d3 100644 +--- a/test/DebugInfo/X86/constant-loclist.ll ++++ b/test/DebugInfo/X86/constant-loclist.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj %t.ll -o - -experimental-debug-variable-locations=false | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; A hand-written testcase to check 64-bit constant handling in location lists. + +diff --git a/test/DebugInfo/X86/convert-debugloc.ll b/test/DebugInfo/X86/convert-debugloc.ll +index a63db6e944..3c5c9614b2 100644 +--- a/test/DebugInfo/X86/convert-debugloc.ll ++++ b/test/DebugInfo/X86/convert-debugloc.ll +@@ -1,23 +1,23 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-allow-extra-diexpressions + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ + ; RUN: | FileCheck %s --check-prefix=DW5 "--implicit-check-not={{DW_TAG|NULL}}" +-; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ + ; RUN: | FileCheck %s --check-prefix=DW4 "--implicit-check-not={{DW_TAG|NULL}}" + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-allow-extra-diexpressions --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ + ; RUN: | FileCheck %s --check-prefix=DW5 "--implicit-check-not={{DW_TAG|NULL}}" +-; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ + ; RUN: | FileCheck %s --check-prefix=DW4 "--implicit-check-not={{DW_TAG|NULL}}" + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=5 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ + ; RUN: | FileCheck %s --check-prefix=DW5 "--implicit-check-not={{DW_TAG|NULL}}" +-; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=4 -filetype=obj -O0 < %t.ll | llvm-dwarfdump - \ + ; RUN: | FileCheck %s --check-prefix=DW4 "--implicit-check-not={{DW_TAG|NULL}}" + + ; DW5: .debug_info contents: +diff --git a/test/DebugInfo/X86/dbg-byval-parameter.ll b/test/DebugInfo/X86/dbg-byval-parameter.ll +index 78909f0553..b51c60b58f 100644 +--- a/test/DebugInfo/X86/dbg-byval-parameter.ll ++++ b/test/DebugInfo/X86/dbg-byval-parameter.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86 -asm-verbose < %t.ll | grep DW_TAG_formal_parameter + + target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" + target triple = "spir64-unknown-unknown" +diff --git a/test/DebugInfo/X86/dbg-declare-alloca.ll b/test/DebugInfo/X86/dbg-declare-alloca.ll +index 39840fb963..831cd023dc 100644 +--- a/test/DebugInfo/X86/dbg-declare-alloca.ll ++++ b/test/DebugInfo/X86/dbg-declare-alloca.ll +@@ -1,18 +1,18 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s +-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s +-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s +-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v - --debug-info | FileCheck %s --check-prefix=DWARF + + ; This should use the frame index side table for allocas, not DBG_VALUE + ; instructions. For SDAG ISel, this test would see an SDNode materializing the +diff --git a/test/DebugInfo/X86/dbg-declare-arg.ll b/test/DebugInfo/X86/dbg-declare-arg.ll +index 11ca766374..137f9e59be 100644 +--- a/test/DebugInfo/X86/dbg-declare-arg.ll ++++ b/test/DebugInfo/X86/dbg-declare-arg.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 -fast-isel=true -filetype=obj -o - %t.ll | llvm-dwarfdump -v - | FileCheck %s + + target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" + target triple = "spir64-unknown-unknown" +diff --git a/test/DebugInfo/X86/dbg-prolog-end.ll b/test/DebugInfo/X86/dbg-prolog-end.ll +index d9c7257aa4..755b4b980e 100644 +--- a/test/DebugInfo/X86/dbg-prolog-end.ll ++++ b/test/DebugInfo/X86/dbg-prolog-end.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O0 < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O0 < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O0 < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O0 < %t.ll | FileCheck %s + + target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" + target triple = "spir64-unknown-unknown" +diff --git a/test/DebugInfo/X86/dbg-value-const-byref.ll b/test/DebugInfo/X86/dbg-value-const-byref.ll +index 4770371f10..be0efb138c 100644 +--- a/test/DebugInfo/X86/dbg-value-const-byref.ll ++++ b/test/DebugInfo/X86/dbg-value-const-byref.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -O1 -filetype=obj -o - %t.ll | llvm-dwarfdump -all - | FileCheck %s + + ; Generated with -O1 from: + ; int f1(); +diff --git a/test/DebugInfo/X86/dbg-value-isel.ll b/test/DebugInfo/X86/dbg-value-isel.ll +index 3e341ab43a..a92d3dbeb2 100644 +--- a/test/DebugInfo/X86/dbg-value-isel.ll ++++ b/test/DebugInfo/X86/dbg-value-isel.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll | FileCheck %s + + target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" + target triple = "spir64-unknown-unknown" +diff --git a/test/DebugInfo/X86/dw_op_minus_direct.ll b/test/DebugInfo/X86/dw_op_minus_direct.ll +index 64ee6149fb..eb93b83952 100644 +--- a/test/DebugInfo/X86/dw_op_minus_direct.ll ++++ b/test/DebugInfo/X86/dw_op_minus_direct.ll +@@ -2,26 +2,26 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s +-; RUN: llc -mtriple=%triple -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ + ; RUN: | FileCheck %s --check-prefix=DWARF2 +-; RUN: llc -mtriple=%triple -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ + ; RUN: | FileCheck %s --check-prefix=DWARF2 + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s +-; RUN: llc -mtriple=%triple -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ + ; RUN: | FileCheck %s --check-prefix=DWARF2 +-; RUN: llc -mtriple=%triple -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ + ; RUN: | FileCheck %s --check-prefix=DWARF2 + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s +-; RUN: llc -mtriple=%triple -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=2 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ + ; RUN: | FileCheck %s --check-prefix=DWARF2 +-; RUN: llc -mtriple=%triple -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -dwarf-version=3 -filetype=obj < %t.ll | llvm-dwarfdump -v - \ + ; RUN: | FileCheck %s --check-prefix=DWARF2 + + ; This was derived manually from: +diff --git a/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll b/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll +index 5a07194875..f1bc6b9033 100644 +--- a/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll ++++ b/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -generate-arange-section < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -generate-arange-section < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -generate-arange-section < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -generate-arange-section < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -generate-arange-section < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -generate-arange-section < %t.ll | FileCheck %s + + ; CHECK: .short 2 # DWARF Arange version number + ; CHECK: # Segment Size +diff --git a/test/DebugInfo/X86/float_const.ll b/test/DebugInfo/X86/float_const.ll +index 5f57fb72bb..abf68ad35f 100644 +--- a/test/DebugInfo/X86/float_const.ll ++++ b/test/DebugInfo/X86/float_const.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %t.ll -filetype=obj | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; from (at -Os): + ; void foo() { +diff --git a/test/DebugInfo/X86/frame-register.ll b/test/DebugInfo/X86/frame-register.ll +index 1f911eef5f..284b532bf9 100644 +--- a/test/DebugInfo/X86/frame-register.ll ++++ b/test/DebugInfo/X86/frame-register.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v --debug-info - | FileCheck %s + + ; CHECK: DW_TAG_variable + ; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg +0) +diff --git a/test/DebugInfo/X86/inlined-formal-parameter.ll b/test/DebugInfo/X86/inlined-formal-parameter.ll +index 657effe483..cbd0d9d7d7 100644 +--- a/test/DebugInfo/X86/inlined-formal-parameter.ll ++++ b/test/DebugInfo/X86/inlined-formal-parameter.ll +@@ -1,17 +1,17 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj -o %t.o %t.ll ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t.o %t.ll + ; RUN: llvm-dwarfdump -v %t.o | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj -o %t.o %t.ll ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t.o %t.ll + ; RUN: llvm-dwarfdump -v %t.o | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj -o %t.o %t.ll ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t.o %t.ll + ; RUN: llvm-dwarfdump -v %t.o | FileCheck %s + + ; Testcase generated using 'clang -g -O2 -S -emit-llvm' from the following: +diff --git a/test/DebugInfo/X86/isel-cse-line.ll b/test/DebugInfo/X86/isel-cse-line.ll +index f48e1782d4..8abc1f5dbe 100644 +--- a/test/DebugInfo/X86/isel-cse-line.ll ++++ b/test/DebugInfo/X86/isel-cse-line.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -fast-isel=false -O0 < %t.ll | FileCheck %s + ; + ; Generated by: + ; clang -emit-llvm -S -g test.cpp +diff --git a/test/DebugInfo/X86/mixed-nodebug-cu.ll b/test/DebugInfo/X86/mixed-nodebug-cu.ll +index 1a862e4477..23511235c5 100644 +--- a/test/DebugInfo/X86/mixed-nodebug-cu.ll ++++ b/test/DebugInfo/X86/mixed-nodebug-cu.ll +@@ -1,17 +1,17 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -o %t -filetype=obj ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -o %t -filetype=obj + ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -o %t -filetype=obj ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -o %t -filetype=obj + ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -o %t -filetype=obj ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -o %t -filetype=obj + ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s + + ; CHECK: DW_TAG_compile_unit +diff --git a/test/DebugInfo/X86/nophysreg.ll b/test/DebugInfo/X86/nophysreg.ll +index b2dc00b0f0..3caf40e14d 100644 +--- a/test/DebugInfo/X86/nophysreg.ll ++++ b/test/DebugInfo/X86/nophysreg.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -debug-info - | FileCheck %s + ; + ; PR22296: In this testcase the DBG_VALUE describing "p5" becomes unavailable + ; because the register its address is in is clobbered and we (currently) aren't +diff --git a/test/DebugInfo/X86/partial-constant.ll b/test/DebugInfo/X86/partial-constant.ll +index fb1856449b..1eb8b1669c 100644 +--- a/test/DebugInfo/X86/partial-constant.ll ++++ b/test/DebugInfo/X86/partial-constant.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v - | FileCheck %s + + ; Generated at -O2 from: + ; bool c(); +diff --git a/test/DebugInfo/X86/single-dbg_value.ll b/test/DebugInfo/X86/single-dbg_value.ll +index d50ad74731..2f96f5a5b6 100644 +--- a/test/DebugInfo/X86/single-dbg_value.ll ++++ b/test/DebugInfo/X86/single-dbg_value.ll +@@ -1,23 +1,23 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -stop-after=livedebugvalues -o - %t.ll \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -stop-after=livedebugvalues -o - %t.ll \ + ; RUN: | FileCheck %s --check-prefix=SANITY +-; RUN: llc -mtriple=%triple -march=x86-64 -o - %t.ll -filetype=obj \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -o - %t.ll -filetype=obj \ + ; RUN: | llvm-dwarfdump -v -all - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -stop-after=livedebugvalues -o - %t.ll \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -stop-after=livedebugvalues -o - %t.ll \ + ; RUN: | FileCheck %s --check-prefix=SANITY +-; RUN: llc -mtriple=%triple -march=x86-64 -o - %t.ll -filetype=obj \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -o - %t.ll -filetype=obj \ + ; RUN: | llvm-dwarfdump -v -all - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -stop-after=livedebugvalues -o - %t.ll \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -stop-after=livedebugvalues -o - %t.ll \ + ; RUN: | FileCheck %s --check-prefix=SANITY +-; RUN: llc -mtriple=%triple -march=x86-64 -o - %t.ll -filetype=obj \ ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -march=x86-64 -o - %t.ll -filetype=obj \ + ; RUN: | llvm-dwarfdump -v -all - | FileCheck %s + ; + ; CHECK: .debug_info contents: +diff --git a/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll b/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll +index 1476a48b31..a405ab0f45 100644 +--- a/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll ++++ b/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll +@@ -2,20 +2,20 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o +-; RUN: llc -mtriple=%triple -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o + ; RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o +-; RUN: llc -mtriple=%triple -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o + ; RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o +-; RUN: llc -mtriple=%triple -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o %t/a.o ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=bar.dwo %t.ll -filetype=obj -o %t/b.o + ; RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s + + target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" +diff --git a/test/DebugInfo/X86/split-dwarf-omit-empty.ll b/test/DebugInfo/X86/split-dwarf-omit-empty.ll +index 74ed65dd0d..f725770991 100644 +--- a/test/DebugInfo/X86/split-dwarf-omit-empty.ll ++++ b/test/DebugInfo/X86/split-dwarf-omit-empty.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo %t.ll -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s + + target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" + target triple = "spir64-unknown-unknown" +diff --git a/test/DebugInfo/X86/static_member_array.ll b/test/DebugInfo/X86/static_member_array.ll +index 1ed03c3825..3a0d8a426e 100644 +--- a/test/DebugInfo/X86/static_member_array.ll ++++ b/test/DebugInfo/X86/static_member_array.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu %t.ll -filetype=obj -o - | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; Generated from: + ; +diff --git a/test/DebugInfo/X86/this-stack_value.ll b/test/DebugInfo/X86/this-stack_value.ll +index e721a965a1..1b9e9dd399 100644 +--- a/test/DebugInfo/X86/this-stack_value.ll ++++ b/test/DebugInfo/X86/this-stack_value.ll +@@ -1,18 +1,18 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM +-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM +-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM +-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=asm -o - %t.ll | FileCheck %s --check-prefix=ASM ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump -v --debug-info - | FileCheck %s + ; + ; Generated at -O2 from: + ; struct B; +diff --git a/test/DebugInfo/X86/unattached-global.ll b/test/DebugInfo/X86/unattached-global.ll +index ab42af7b8e..3e9b85c3a8 100644 +--- a/test/DebugInfo/X86/unattached-global.ll ++++ b/test/DebugInfo/X86/unattached-global.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o - %t.ll | llvm-dwarfdump - | FileCheck %s + + target datalayout = "e-p:64:64" + target triple = "spir64-unknown-unknown" +diff --git a/test/DebugInfo/X86/union-const.ll b/test/DebugInfo/X86/union-const.ll +index 403934796c..429555a556 100644 +--- a/test/DebugInfo/X86/union-const.ll ++++ b/test/DebugInfo/X86/union-const.ll +@@ -1,15 +1,15 @@ + ; RUN: llvm-as < %s -o %t.bc + ; RUN: llvm-spirv %t.bc -o %t.spv + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-100 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; RUN: llvm-spirv %t.bc -o %t.spv -spirv-debug-info-version=nonsemantic-shader-200 + ; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o %t.ll +-; RUN: llc -mtriple=%triple -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s ++; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %t.ll | llvm-dwarfdump -v -debug-info - | FileCheck %s + + ; CHECK: DW_TAG_variable + ; CHECK-NEXT: DW_AT_const_value [DW_FORM_udata] (0) |