Skip to content

Commit 80d52d7

Browse files
committed
[CIR] Update call lowering tests and remove more XFAILs
1 parent 86aa3e5 commit 80d52d7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

clang/test/CIR/Lowering/call-op-call-conv.cir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// XFAIL: *
21
// RUN: cir-translate -cir-to-llvmir --disable-cc-lowering %s -o %t.ll
32
// RUN: FileCheck --input-file=%t.ll %s --check-prefix=LLVM
43

@@ -9,13 +8,14 @@ module {
98
cir.func private @my_add(%a: !s32i, %b: !s32i) -> !s32i cc(spir_function)
109

1110
cir.func @ind(%fnptr: !fnptr, %a : !s32i) {
12-
%1 = cir.call %fnptr(%a) : (!fnptr, !s32i) -> !s32i cc(spir_kernel)
13-
// LLVM: %{{[0-9]+}} = call spir_kernel i32 %{{[0-9]+}}(i32 %{{[0-9]+}})
11+
// https://github.com/llvm/clangir/issues/1814
12+
// %1 = cir.call %fnptr(%a) : (!fnptr, !s32i) -> !s32i cc(spir_kernel)
13+
// LLVM-DISABLE: %{{[0-9]+}} = call spir_kernel i32 %{{[0-9]+}}(i32 %{{[0-9]+}})
1414

1515
%2 = cir.call %fnptr(%a) : (!fnptr, !s32i) -> !s32i cc(spir_function)
1616
// LLVM: %{{[0-9]+}} = call spir_func i32 %{{[0-9]+}}(i32 %{{[0-9]+}})
1717

18-
%3 = cir.call @my_add(%1, %2) : (!s32i, !s32i) -> !s32i cc(spir_function)
18+
%3 = cir.call @my_add(%2, %2) : (!s32i, !s32i) -> !s32i cc(spir_function)
1919
// LLVM: %{{[0-9]+}} = call spir_func i32 @my_add(i32 %{{[0-9]+}}, i32 %{{[0-9]+}})
2020

2121
cir.return

clang/test/CIR/Lowering/call.cir

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR
22
// RUN: cir-translate %s -cir-to-llvmir --disable-cc-lowering | FileCheck %s -check-prefix=LLVM
3-
// XFAIL: *
43

54
!s32i = !cir.int<s, 32>
65
module {
@@ -116,7 +115,7 @@ module {
116115
// LLVM: %{{.+}} = call i32 @add(i32 0, i32 1) #[[#pure:]]
117116
// LLVM: %{{.+}} = call i32 @add(i32 0, i32 1) #[[#const:]]
118117
// LLVM: }
119-
// LLVM: attributes #[[#pure]] = { nounwind willreturn memory(read) }
118+
// LLVM: attributes #[[#pure]] = { nounwind willreturn memory(read, errnomem: none) }
120119
// LLVM: attributes #[[#const]] = { nounwind willreturn memory(none) }
121120

122121
} // end module

0 commit comments

Comments
 (0)