1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc -mtriple=i686 < %s | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc -mtriple=x86_64 < %s | FileCheck %s --check-prefixes=CHECK,X64
5 @var = internal global i32 0, align 4
7 define dso_local void @test_c() nounwind {
11 ; CHECK-NEXT: #TEST 42
14 ; CHECK-NEXT: #TEST var
16 ; CHECK-NEXT: ret{{[l|q]}}
17 tail call void asm sideeffect "#TEST ${0:c}", "i"(i32 42)
18 tail call void asm sideeffect "#TEST ${0:c}", "i"(ptr nonnull @var)
22 define dso_local void @test_n() nounwind {
23 ; CHECK-LABEL: test_n:
26 ; CHECK-NEXT: #TEST 37
28 ; CHECK-NEXT: ret{{[l|q]}}
29 tail call void asm sideeffect "#TEST ${0:n}", "i"(i32 -37)
33 define void @test_q() {
34 ; CHECK-LABEL: test_q:
35 ; CHECK: # %bb.0: # %entry
39 ; CHECK-NEXT: ret{{[l|q]}}
41 call void asm sideeffect "#TEST ${0:q}", "=*imr"( ptr elementtype( i64) null )
45 define void @test_V(ptr %p) {
47 ; X86: # %bb.0: # %entry
48 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
50 ; X86-NEXT: calll __x86_indirect_thunk_eax
55 ; X64: # %bb.0: # %entry
57 ; X64-NEXT: callq __x86_indirect_thunk_rdi
61 tail call void asm sideeffect "call __x86_indirect_thunk_${0:V}", "r,~{dirflag},~{fpsr},~{flags}"(ptr %p)