1; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+3dnow | FileCheck %s 2 3define x86_mmx @stack_fold_pavgusb(x86_mmx %a, x86_mmx %b) { 4 ;CHECK-LABEL: stack_fold_pavgusb 5 ;CHECK: pavgusb {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 6 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 7 %2 = call x86_mmx @llvm.x86.3dnow.pavgusb(x86_mmx %a, x86_mmx %b) nounwind readnone 8 ret x86_mmx %2 9} 10declare x86_mmx @llvm.x86.3dnow.pavgusb(x86_mmx, x86_mmx) nounwind readnone 11 12define x86_mmx @stack_fold_pf2id(x86_mmx %a) { 13 ;CHECK-LABEL: stack_fold_pf2id 14 ;CHECK: pf2id {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 15 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 16 %2 = call x86_mmx @llvm.x86.3dnow.pf2id(x86_mmx %a) nounwind readnone 17 ret x86_mmx %2 18} 19declare x86_mmx @llvm.x86.3dnow.pf2id(x86_mmx) nounwind readnone 20 21define x86_mmx @stack_fold_pf2iw(x86_mmx %a) { 22 ;CHECK-LABEL: stack_fold_pf2iw 23 ;CHECK: pf2iw {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 24 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 25 %2 = call x86_mmx @llvm.x86.3dnowa.pf2iw(x86_mmx %a) nounwind readnone 26 ret x86_mmx %2 27} 28declare x86_mmx @llvm.x86.3dnowa.pf2iw(x86_mmx) nounwind readnone 29 30define x86_mmx @stack_fold_pfacc(x86_mmx %a, x86_mmx %b) { 31 ;CHECK-LABEL: stack_fold_pfacc 32 ;CHECK: pfacc {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 33 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 34 %2 = call x86_mmx @llvm.x86.3dnow.pfacc(x86_mmx %a, x86_mmx %b) nounwind readnone 35 ret x86_mmx %2 36} 37declare x86_mmx @llvm.x86.3dnow.pfacc(x86_mmx, x86_mmx) nounwind readnone 38 39define x86_mmx @stack_fold_pfadd(x86_mmx %a, x86_mmx %b) { 40 ;CHECK-LABEL: stack_fold_pfadd 41 ;CHECK: pfadd {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 42 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 43 %2 = call x86_mmx @llvm.x86.3dnow.pfadd(x86_mmx %a, x86_mmx %b) nounwind readnone 44 ret x86_mmx %2 45} 46declare x86_mmx @llvm.x86.3dnow.pfadd(x86_mmx, x86_mmx) nounwind readnone 47 48define x86_mmx @stack_fold_pfcmpeq(x86_mmx %a, x86_mmx %b) { 49 ;CHECK-LABEL: stack_fold_pfcmpeq 50 ;CHECK: pfcmpeq {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 51 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 52 %2 = call x86_mmx @llvm.x86.3dnow.pfcmpeq(x86_mmx %a, x86_mmx %b) nounwind readnone 53 ret x86_mmx %2 54} 55declare x86_mmx @llvm.x86.3dnow.pfcmpeq(x86_mmx, x86_mmx) nounwind readnone 56 57define x86_mmx @stack_fold_pfcmpge(x86_mmx %a, x86_mmx %b) { 58 ;CHECK-LABEL: stack_fold_pfcmpge 59 ;CHECK: pfcmpge {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 60 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 61 %2 = call x86_mmx @llvm.x86.3dnow.pfcmpge(x86_mmx %a, x86_mmx %b) nounwind readnone 62 ret x86_mmx %2 63} 64declare x86_mmx @llvm.x86.3dnow.pfcmpge(x86_mmx, x86_mmx) nounwind readnone 65 66define x86_mmx @stack_fold_pfcmpgt(x86_mmx %a, x86_mmx %b) { 67 ;CHECK-LABEL: stack_fold_pfcmpgt 68 ;CHECK: pfcmpgt {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 69 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 70 %2 = call x86_mmx @llvm.x86.3dnow.pfcmpgt(x86_mmx %a, x86_mmx %b) nounwind readnone 71 ret x86_mmx %2 72} 73declare x86_mmx @llvm.x86.3dnow.pfcmpgt(x86_mmx, x86_mmx) nounwind readnone 74 75define x86_mmx @stack_fold_pfmax(x86_mmx %a, x86_mmx %b) { 76 ;CHECK-LABEL: stack_fold_pfmax 77 ;CHECK: pfmax {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 78 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 79 %2 = call x86_mmx @llvm.x86.3dnow.pfmax(x86_mmx %a, x86_mmx %b) nounwind readnone 80 ret x86_mmx %2 81} 82declare x86_mmx @llvm.x86.3dnow.pfmax(x86_mmx, x86_mmx) nounwind readnone 83 84define x86_mmx @stack_fold_pfmin(x86_mmx %a, x86_mmx %b) { 85 ;CHECK-LABEL: stack_fold_pfmin 86 ;CHECK: pfmin {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 87 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 88 %2 = call x86_mmx @llvm.x86.3dnow.pfmin(x86_mmx %a, x86_mmx %b) nounwind readnone 89 ret x86_mmx %2 90} 91declare x86_mmx @llvm.x86.3dnow.pfmin(x86_mmx, x86_mmx) nounwind readnone 92 93define x86_mmx @stack_fold_pfmul(x86_mmx %a, x86_mmx %b) { 94 ;CHECK-LABEL: stack_fold_pfmul 95 ;CHECK: pfmul {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 96 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 97 %2 = call x86_mmx @llvm.x86.3dnow.pfmul(x86_mmx %a, x86_mmx %b) nounwind readnone 98 ret x86_mmx %2 99} 100declare x86_mmx @llvm.x86.3dnow.pfmul(x86_mmx, x86_mmx) nounwind readnone 101 102define x86_mmx @stack_fold_pfnacc(x86_mmx %a, x86_mmx %b) { 103 ;CHECK-LABEL: stack_fold_pfnacc 104 ;CHECK: pfnacc {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 105 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 106 %2 = call x86_mmx @llvm.x86.3dnowa.pfnacc(x86_mmx %a, x86_mmx %b) nounwind readnone 107 ret x86_mmx %2 108} 109declare x86_mmx @llvm.x86.3dnowa.pfnacc(x86_mmx, x86_mmx) nounwind readnone 110 111define x86_mmx @stack_fold_pfpnacc(x86_mmx %a, x86_mmx %b) { 112 ;CHECK-LABEL: stack_fold_pfpnacc 113 ;CHECK: pfpnacc {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 114 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 115 %2 = call x86_mmx @llvm.x86.3dnowa.pfpnacc(x86_mmx %a, x86_mmx %b) nounwind readnone 116 ret x86_mmx %2 117} 118declare x86_mmx @llvm.x86.3dnowa.pfpnacc(x86_mmx, x86_mmx) nounwind readnone 119 120define x86_mmx @stack_fold_pfrcp(x86_mmx %a) { 121 ;CHECK-LABEL: stack_fold_pfrcp 122 ;CHECK: pfrcp {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 123 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 124 %2 = call x86_mmx @llvm.x86.3dnow.pfrcp(x86_mmx %a) nounwind readnone 125 ret x86_mmx %2 126} 127declare x86_mmx @llvm.x86.3dnow.pfrcp(x86_mmx) nounwind readnone 128 129define x86_mmx @stack_fold_pfrcpit1(x86_mmx %a, x86_mmx %b) { 130 ;CHECK-LABEL: stack_fold_pfrcpit1 131 ;CHECK: pfrcpit1 {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 132 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 133 %2 = call x86_mmx @llvm.x86.3dnow.pfrcpit1(x86_mmx %a, x86_mmx %b) nounwind readnone 134 ret x86_mmx %2 135} 136declare x86_mmx @llvm.x86.3dnow.pfrcpit1(x86_mmx, x86_mmx) nounwind readnone 137 138define x86_mmx @stack_fold_pfrcpit2(x86_mmx %a, x86_mmx %b) { 139 ;CHECK-LABEL: stack_fold_pfrcpit2 140 ;CHECK: pfrcpit2 {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 141 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 142 %2 = call x86_mmx @llvm.x86.3dnow.pfrcpit2(x86_mmx %a, x86_mmx %b) nounwind readnone 143 ret x86_mmx %2 144} 145declare x86_mmx @llvm.x86.3dnow.pfrcpit2(x86_mmx, x86_mmx) nounwind readnone 146 147define x86_mmx @stack_fold_pfrsqit1(x86_mmx %a, x86_mmx %b) { 148 ;CHECK-LABEL: stack_fold_pfrsqit1 149 ;CHECK: pfrsqit1 {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 150 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 151 %2 = call x86_mmx @llvm.x86.3dnow.pfrsqit1(x86_mmx %a, x86_mmx %b) nounwind readnone 152 ret x86_mmx %2 153} 154declare x86_mmx @llvm.x86.3dnow.pfrsqit1(x86_mmx, x86_mmx) nounwind readnone 155 156define x86_mmx @stack_fold_pfrsqrt(x86_mmx %a) { 157 ;CHECK-LABEL: stack_fold_pfrsqrt 158 ;CHECK: pfrsqrt {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 159 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 160 %2 = call x86_mmx @llvm.x86.3dnow.pfrsqrt(x86_mmx %a) nounwind readnone 161 ret x86_mmx %2 162} 163declare x86_mmx @llvm.x86.3dnow.pfrsqrt(x86_mmx) nounwind readnone 164 165define x86_mmx @stack_fold_pfsub(x86_mmx %a, x86_mmx %b) { 166 ;CHECK-LABEL: stack_fold_pfsub 167 ;CHECK: pfsub {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 168 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 169 %2 = call x86_mmx @llvm.x86.3dnow.pfsub(x86_mmx %a, x86_mmx %b) nounwind readnone 170 ret x86_mmx %2 171} 172declare x86_mmx @llvm.x86.3dnow.pfsub(x86_mmx, x86_mmx) nounwind readnone 173 174define x86_mmx @stack_fold_pfsubr(x86_mmx %a, x86_mmx %b) { 175 ;CHECK-LABEL: stack_fold_pfsubr 176 ;CHECK: pfsubr {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 177 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 178 %2 = call x86_mmx @llvm.x86.3dnow.pfsubr(x86_mmx %a, x86_mmx %b) nounwind readnone 179 ret x86_mmx %2 180} 181declare x86_mmx @llvm.x86.3dnow.pfsubr(x86_mmx, x86_mmx) nounwind readnone 182 183define x86_mmx @stack_fold_pi2fd(x86_mmx %a) { 184 ;CHECK-LABEL: stack_fold_pi2fd 185 ;CHECK: pi2fd {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 186 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 187 %2 = call x86_mmx @llvm.x86.3dnow.pi2fd(x86_mmx %a) nounwind readnone 188 ret x86_mmx %2 189} 190declare x86_mmx @llvm.x86.3dnow.pi2fd(x86_mmx) nounwind readnone 191 192define x86_mmx @stack_fold_pi2fw(x86_mmx %a) { 193 ;CHECK-LABEL: stack_fold_pi2fw 194 ;CHECK: pi2fw {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 195 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 196 %2 = call x86_mmx @llvm.x86.3dnowa.pi2fw(x86_mmx %a) nounwind readnone 197 ret x86_mmx %2 198} 199declare x86_mmx @llvm.x86.3dnowa.pi2fw(x86_mmx) nounwind readnone 200 201define x86_mmx @stack_fold_pmulhrw(x86_mmx %a, x86_mmx %b) { 202 ;CHECK-LABEL: stack_fold_pmulhrw 203 ;CHECK: pmulhrw {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 204 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 205 %2 = call x86_mmx @llvm.x86.3dnow.pmulhrw(x86_mmx %a, x86_mmx %b) nounwind readnone 206 ret x86_mmx %2 207} 208declare x86_mmx @llvm.x86.3dnow.pmulhrw(x86_mmx, x86_mmx) nounwind readnone 209 210define x86_mmx @stack_fold_pswapd(x86_mmx %a) { 211 ;CHECK-LABEL: stack_fold_pswapd 212 ;CHECK: pswapd {{-?[0-9]*}}(%rsp), {{%mm[0-7]}} {{.*#+}} 8-byte Folded Reload 213 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 214 %2 = call x86_mmx @llvm.x86.3dnowa.pswapd(x86_mmx %a) nounwind readnone 215 ret x86_mmx %2 216} 217declare x86_mmx @llvm.x86.3dnowa.pswapd(x86_mmx) nounwind readnone 218