Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/OpenMP/barrier.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s


module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/OpenMP/parallel.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s

!s32i = !cir.int<s, 32>
module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/OpenMP/taskwait.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s


module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/OpenMP/taskyield.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s


module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/array.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM

!s32i = !cir.int<s, 32>
!ty_S = !cir.struct<struct "S" {!s32i} #cir.record.decl.ast>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/attribute-lowering.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM

!s32i = !cir.int<s, 32>
!s8i = !cir.int<u, 8>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/binop-fp.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

module {
cir.func @foo() {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/binop-overflow.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM

!u32i = !cir.int<u, 32>
!s32i = !cir.int<s, 32>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/binop-unsigned-int.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
!u32i = !cir.int<u, 32>

module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/bitint.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!s32i = !cir.int<s, 32>

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/bool-to-int.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s

!s32i = !cir.int<s, 32>
#false = #cir.bool<false> : !cir.bool
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/bool.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

#false = #cir.bool<false> : !cir.bool
#true = #cir.bool<true> : !cir.bool
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/branch.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!s32i = !cir.int<s, 32>
cir.func @foo(%arg0: !cir.bool) -> !s32i {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/brcond.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!s32i = !cir.int<s, 32>
#fn_attr = #cir<extra({inline = #cir.inline<no>, nothrow = #cir.nothrow, optnone = #cir.optnone})>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/bswap.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!u32i = !cir.int<u, 32>

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/call-op-call-conv.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate -cir-to-llvmir --disable-cc-lowering %s -o %t.ll
// RUN: cir-translate -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM

!s32i = !cir.int<s, 32>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/call.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// XFAIL: *

!s32i = !cir.int<s, 32>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/cmp3way.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!s8i = !cir.int<s, 8>
!s32i = !cir.int<s, 32>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/complex.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate -cir-to-llvmir --disable-cc-lowering -o %t.ll %s
// RUN: cir-translate -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o %t.ll %s
// RUN: FileCheck --input-file %t.ll -check-prefix=LLVM %s

!s32i = !cir.int<s, 32>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/const-array.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM

!u8i = !cir.int<u, 8>
#false = #cir.bool<false> : !cir.bool
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/expect.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!s64i = !cir.int<s, 64>
module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/func-call-conv.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering -o %t.ll
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o %t.ll
// RUN: FileCheck %s --input-file=%t.ll --check-prefix=LLVM

!s32i = !cir.int<s, 32>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/globals.cir
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: cir-opt %s -cir-to-llvm -o %t.mlir
// RUN: FileCheck --input-file=%t.mlir %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering -o %t.ll
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM

!void = !cir.void
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/if.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
!s32i = !cir.int<s, 32>

module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/int-wrap.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!s32i = !cir.int<s, 32>
module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/intrinsics.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

module {
cir.func @test_unreachable() {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/ptrdiff.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s

!s32i = !cir.int<s, 32>
!u64i = !cir.int<u, 64>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/region-simplify.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -canonicalize -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-opt %s -canonicalize -o - | cir-translate -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-opt %s -canonicalize -o - | cir-translate -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM

!u32i = !cir.int<u, 32>

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/scope.cir
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: cir-opt %s -cir-to-llvm -o %t.cir
// RUN: FileCheck %s --input-file=%t.cir -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
!u32i = !cir.int<u, 32>

module {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/select.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate -cir-to-llvmir --disable-cc-lowering -o %t.ll %s
// RUN: cir-translate -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o %t.ll %s
// RUN: FileCheck --input-file=%t.ll -check-prefix=LLVM %s

!s32i = !cir.int<s, 32>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/syncscope.cir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering -o - | FileCheck %s -check-prefix=LLVM

!s32i = !cir.int<s, 32>
#fn_attr = #cir<extra({inline = #cir.inline<no>, nothrow = #cir.nothrow, optnone = #cir.optnone})>
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/unary-inc-dec.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
!s32i = !cir.int<s, 32>
module {
cir.func @foo() {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Lowering/unary-not.cir
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
// RUN: cir-translate %s -cir-to-llvmir --target x86_64-unknown-linux-gnu --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
!s32i = !cir.int<s, 32>
module {
cir.func @foo() -> !s32i {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// RUN: FileCheck %s -input-file %t.x86.ll -check-prefix=X86
// RUN: cir-translate --cir-to-llvmir --target spirv64-unknown-unknown --disable-cc-lowering %s -o %t.spirv64.ll
// RUN: FileCheck %s -input-file %t.spirv64.ll -check-prefix=SPIRV64
// RUN: cir-translate --cir-to-llvmir --disable-cc-lowering %s -o %t.default.ll
// RUN: FileCheck %s -input-file %t.default.ll -check-prefix=DEFAULT

module attributes {
dlti.dl_spec = #dlti.dl_spec<"dlti.global_memory_space" = 7 : ui64>
Expand All @@ -18,6 +16,3 @@ module attributes {

// SPIRV64-NOT: target datalayout = "G7"
// SPIRV64-DAG: target triple = "spirv64-unknown-unknown"

// DEFAULT-NOT: target datalayout = "G7"
// DEFAULT-DAG: target triple = "x86_64-unknown-linux-gnu"
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// RUN: FileCheck %s -input-file %t.x86.ll -check-prefix=X86
// RUN: cir-translate --cir-to-llvmir --target spirv64-unknown-unknown --disable-cc-lowering %s -o %t.spirv64.ll
// RUN: FileCheck %s -input-file %t.spirv64.ll -check-prefix=SPIRV64
// RUN: cir-translate --cir-to-llvmir --disable-cc-lowering %s -o %t.default.ll
// RUN: FileCheck %s -input-file %t.default.ll -check-prefix=DEFAULT

module {
cir.func @foo() {
Expand All @@ -16,6 +14,3 @@ module {

// SPIRV64-DAG: target triple = "spirv64-unknown-unknown"
// SPIRV64-DAG: target datalayout = "{{.*}}"

// DEFAULT-DAG: target triple = "x86_64-unknown-linux-gnu"
// DEFAULT-DAG: target datalayout = "{{.*}}"
5 changes: 3 additions & 2 deletions clang/test/CIR/Tools/cir-translate/warn-default-triple.cir
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: cir-translate -verify-diagnostics --cir-to-llvmir --disable-cc-lowering %s
// XFAIL: target={{.*windows.*}}
// RUN: cir-translate -verify-diagnostics --cir-to-llvmir --disable-cc-lowering %s 2>&1

// expected-warning@below {{no target triple provided, assuming x86_64-unknown-linux-gnu}}
// expected-warning@below {{no target triple provided, assuming}}
module {
cir.func @foo() {
cir.return
Expand Down
4 changes: 1 addition & 3 deletions clang/tools/cir-translate/cir-translate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ std::string prepareCIRModuleTriple(mlir::ModuleOp mod) {

// Treat "" as the default target machine.
if (triple.empty()) {
// Currently ClangIR only supports a couple of targets. Not specifying a
// target triple will default to x86_64-unknown-linux-gnu.
triple = "x86_64-unknown-linux-gnu";
triple = llvm::sys::getDefaultTargetTriple();

mod.emitWarning() << "no target triple provided, assuming " << triple;
}
Expand Down
Loading