[MLIR] Extend MPI dialect (#123255)
[llvm-project.git] / llvm / test / CodeGen / WebAssembly / inlineasm-output-template.ll
blob61931d7b555593b08a6f3695bbbab49048a1e47b
1 ; RUN: llc -mtriple=wasm32 < %s | FileCheck %s
3 ; Skip past the functype directives, which interfere with the CHECK-LABEL
4 ; matches.
6 ; Test that %c works with immediates
7 ; CHECK-LABEL: test_inlineasm_c_output_template0:
8 ; CHECK: #TEST 42
9 define dso_local i32 @test_inlineasm_c_output_template0() {
10   tail call void asm sideeffect "#TEST ${0:c}", "i"(i32 42)
11   ret i32 42
14 ; Test that %c works with global address
15 ; CHECK-LABEL: test_inlineasm_c_output_template2:
16 ; CHECK: #TEST baz
17 @baz = internal global i32 0, align 4
18 define dso_local i32 @test_inlineasm_c_output_template2() {
19   tail call void asm sideeffect "#TEST ${0:c}", "i"(ptr nonnull @baz)
20   ret i32 42
23 ; Test that %n works with immediates
24 ; CHECK-LABEL: test_inlineasm_c_output_template1:
25 ; CHECK: #TEST -42
26 define dso_local i32 @test_inlineasm_c_output_template1() {
27   tail call void asm sideeffect "#TEST ${0:n}", "i"(i32 42)
28   ret i32 42