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