xref: /aosp_15_r20/external/llvm/test/MC/AsmParser/inline-comments.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc %s -o - | sed -n -e '/#APP/,/#NO_APP/p' > %t
2*9880d681SAndroid Build Coastguard Worker; RUN: sed -n -e 's/^;CHECK://p' %s > %t2
3*9880d681SAndroid Build Coastguard Worker; RUN: diff %t %t2
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-unknown-linux-gnu"
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind uwtable
9*9880d681SAndroid Build Coastguard Workerdefine void @foo() #0 {
10*9880d681SAndroid Build Coastguard Workerentry:
11*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"() #0
12*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
13*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
14*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect " ", "~{dirflag},~{fpsr},~{flags}"() #0
15*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
16*9880d681SAndroid Build Coastguard Worker;CHECK:
17*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
18*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "\0A", "~{dirflag},~{fpsr},~{flags}"() #0
19*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
20*9880d681SAndroid Build Coastguard Worker;CHECK:
21*9880d681SAndroid Build Coastguard Worker;CHECK:
22*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
23*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "/*isolated c comment*/", "~{dirflag},~{fpsr},~{flags}"() #0
24*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
25*9880d681SAndroid Build Coastguard Worker;CHECK:	#isolated c comment
26*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
27*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "/**/", "~{dirflag},~{fpsr},~{flags}"() #0
28*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
29*9880d681SAndroid Build Coastguard Worker;CHECK:	#
30*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
31*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "/*comment with\0Anewline*/", "~{dirflag},~{fpsr},~{flags}"() #0
32*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
33*9880d681SAndroid Build Coastguard Worker;CHECK:	#comment with
34*9880d681SAndroid Build Coastguard Worker;CHECK:	#newline
35*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
36*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "//isolated line comment", "~{dirflag},~{fpsr},~{flags}"() #0
37*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
38*9880d681SAndroid Build Coastguard Worker;CHECK:	#isolated line comment
39*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
40*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "#isolated line comment", "~{dirflag},~{fpsr},~{flags}"() #0
41*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
42*9880d681SAndroid Build Coastguard Worker;CHECK:	#isolated line comment
43*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
44*9880d681SAndroid Build Coastguard Worker   call void asm sideeffect "nop /* after nop */", "~{dirflag},~{fpsr},~{flags}"() #0
45*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
46*9880d681SAndroid Build Coastguard Worker;CHECK:	nop	# after nop
47*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
48*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "nop // after nop", "~{dirflag},~{fpsr},~{flags}"() #0
49*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
50*9880d681SAndroid Build Coastguard Worker;CHECK:	nop	# after nop
51*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
52*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "nop # after nop", "~{dirflag},~{fpsr},~{flags}"() #0
53*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
54*9880d681SAndroid Build Coastguard Worker;CHECK:	nop	# after nop
55*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
56*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "nop /* after explicit ended nop */", "~{dirflag},~{fpsr},~{flags}"() #0
57*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
58*9880d681SAndroid Build Coastguard Worker;CHECK:	nop	# after explicit ended nop
59*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
60*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "nop # after explicit ended nop", "~{dirflag},~{fpsr},~{flags}"() #0
61*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
62*9880d681SAndroid Build Coastguard Worker;CHECK:	nop	# after explicit ended nop
63*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
64*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "nop # after explicit end nop", "~{dirflag},~{fpsr},~{flags}"() #0
65*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
66*9880d681SAndroid Build Coastguard Worker;CHECK:	nop	# after explicit end nop
67*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
68*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "/* before nop */ nop", "~{dirflag},~{fpsr},~{flags}"() #0
69*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
70*9880d681SAndroid Build Coastguard Worker;CHECK:	nop	# before nop
71*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
72*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "//comment with escaped newline\0A", "~{dirflag},~{fpsr},~{flags}"() #0
73*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
74*9880d681SAndroid Build Coastguard Worker;CHECK:	#comment with escaped newline
75*9880d681SAndroid Build Coastguard Worker;CHECK:
76*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
77*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "/*0*/xor/*1*/%eax,/*2*/%ecx/*3*///eol", "~{dirflag},~{fpsr},~{flags}"() #0
78*9880d681SAndroid Build Coastguard Worker;CHECK:	#APP
79*9880d681SAndroid Build Coastguard Worker;CHECK:	xorl	%eax, %ecx	#0	#1	#2	#3	#eol
80*9880d681SAndroid Build Coastguard Worker;CHECK:	#NO_APP
81*9880d681SAndroid Build Coastguard Worker  ret void
82*9880d681SAndroid Build Coastguard Worker}
83*9880d681SAndroid Build Coastguard Worker
84*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind }
85*9880d681SAndroid Build Coastguard Worker
86*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!0}
87*9880d681SAndroid Build Coastguard Worker
88*9880d681SAndroid Build Coastguard Worker!0 = !{!"clang version 3.9.0 (trunk 268625) (llvm/trunk 268631)"}
89