1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+3dnow | FileCheck %s 3 4define x86_mmx @stack_fold_pavgusb(x86_mmx %a, x86_mmx %b) { 5; CHECK-LABEL: stack_fold_pavgusb: 6; CHECK: # %bb.0: 7; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 8; CHECK-NEXT: #APP 9; CHECK-NEXT: nop 10; CHECK-NEXT: #NO_APP 11; CHECK-NEXT: pavgusb {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 12; CHECK-NEXT: movq2dq %mm0, %xmm0 13; CHECK-NEXT: retq 14 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 15 %2 = call x86_mmx @llvm.x86.3dnow.pavgusb(x86_mmx %a, x86_mmx %b) nounwind readnone 16 ret x86_mmx %2 17} 18declare x86_mmx @llvm.x86.3dnow.pavgusb(x86_mmx, x86_mmx) nounwind readnone 19 20define x86_mmx @stack_fold_pf2id(x86_mmx %a) { 21; CHECK-LABEL: stack_fold_pf2id: 22; CHECK: # %bb.0: 23; CHECK-NEXT: movq %mm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 24; CHECK-NEXT: #APP 25; CHECK-NEXT: nop 26; CHECK-NEXT: #NO_APP 27; CHECK-NEXT: pf2id {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 28; CHECK-NEXT: movq2dq %mm0, %xmm0 29; CHECK-NEXT: retq 30 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 31 %2 = call x86_mmx @llvm.x86.3dnow.pf2id(x86_mmx %a) nounwind readnone 32 ret x86_mmx %2 33} 34declare x86_mmx @llvm.x86.3dnow.pf2id(x86_mmx) nounwind readnone 35 36define x86_mmx @stack_fold_pf2iw(x86_mmx %a) { 37; CHECK-LABEL: stack_fold_pf2iw: 38; CHECK: # %bb.0: 39; CHECK-NEXT: movq %mm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 40; CHECK-NEXT: #APP 41; CHECK-NEXT: nop 42; CHECK-NEXT: #NO_APP 43; CHECK-NEXT: pf2iw {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 44; CHECK-NEXT: movq2dq %mm0, %xmm0 45; CHECK-NEXT: retq 46 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 47 %2 = call x86_mmx @llvm.x86.3dnowa.pf2iw(x86_mmx %a) nounwind readnone 48 ret x86_mmx %2 49} 50declare x86_mmx @llvm.x86.3dnowa.pf2iw(x86_mmx) nounwind readnone 51 52define x86_mmx @stack_fold_pfacc(x86_mmx %a, x86_mmx %b) { 53; CHECK-LABEL: stack_fold_pfacc: 54; CHECK: # %bb.0: 55; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 56; CHECK-NEXT: #APP 57; CHECK-NEXT: nop 58; CHECK-NEXT: #NO_APP 59; CHECK-NEXT: pfacc {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 60; CHECK-NEXT: movq2dq %mm0, %xmm0 61; CHECK-NEXT: retq 62 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 63 %2 = call x86_mmx @llvm.x86.3dnow.pfacc(x86_mmx %a, x86_mmx %b) nounwind readnone 64 ret x86_mmx %2 65} 66declare x86_mmx @llvm.x86.3dnow.pfacc(x86_mmx, x86_mmx) nounwind readnone 67 68define x86_mmx @stack_fold_pfadd(x86_mmx %a, x86_mmx %b) { 69; CHECK-LABEL: stack_fold_pfadd: 70; CHECK: # %bb.0: 71; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 72; CHECK-NEXT: #APP 73; CHECK-NEXT: nop 74; CHECK-NEXT: #NO_APP 75; CHECK-NEXT: pfadd {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 76; CHECK-NEXT: movq2dq %mm0, %xmm0 77; CHECK-NEXT: retq 78 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 79 %2 = call x86_mmx @llvm.x86.3dnow.pfadd(x86_mmx %a, x86_mmx %b) nounwind readnone 80 ret x86_mmx %2 81} 82declare x86_mmx @llvm.x86.3dnow.pfadd(x86_mmx, x86_mmx) nounwind readnone 83 84define x86_mmx @stack_fold_pfcmpeq(x86_mmx %a, x86_mmx %b) { 85; CHECK-LABEL: stack_fold_pfcmpeq: 86; CHECK: # %bb.0: 87; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 88; CHECK-NEXT: #APP 89; CHECK-NEXT: nop 90; CHECK-NEXT: #NO_APP 91; CHECK-NEXT: pfcmpeq {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 92; CHECK-NEXT: movq2dq %mm0, %xmm0 93; CHECK-NEXT: retq 94 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 95 %2 = call x86_mmx @llvm.x86.3dnow.pfcmpeq(x86_mmx %a, x86_mmx %b) nounwind readnone 96 ret x86_mmx %2 97} 98declare x86_mmx @llvm.x86.3dnow.pfcmpeq(x86_mmx, x86_mmx) nounwind readnone 99 100define x86_mmx @stack_fold_pfcmpge(x86_mmx %a, x86_mmx %b) { 101; CHECK-LABEL: stack_fold_pfcmpge: 102; CHECK: # %bb.0: 103; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 104; CHECK-NEXT: #APP 105; CHECK-NEXT: nop 106; CHECK-NEXT: #NO_APP 107; CHECK-NEXT: pfcmpge {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 108; CHECK-NEXT: movq2dq %mm0, %xmm0 109; CHECK-NEXT: retq 110 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 111 %2 = call x86_mmx @llvm.x86.3dnow.pfcmpge(x86_mmx %a, x86_mmx %b) nounwind readnone 112 ret x86_mmx %2 113} 114declare x86_mmx @llvm.x86.3dnow.pfcmpge(x86_mmx, x86_mmx) nounwind readnone 115 116define x86_mmx @stack_fold_pfcmpgt(x86_mmx %a, x86_mmx %b) { 117; CHECK-LABEL: stack_fold_pfcmpgt: 118; CHECK: # %bb.0: 119; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 120; CHECK-NEXT: #APP 121; CHECK-NEXT: nop 122; CHECK-NEXT: #NO_APP 123; CHECK-NEXT: pfcmpgt {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 124; CHECK-NEXT: movq2dq %mm0, %xmm0 125; CHECK-NEXT: retq 126 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 127 %2 = call x86_mmx @llvm.x86.3dnow.pfcmpgt(x86_mmx %a, x86_mmx %b) nounwind readnone 128 ret x86_mmx %2 129} 130declare x86_mmx @llvm.x86.3dnow.pfcmpgt(x86_mmx, x86_mmx) nounwind readnone 131 132define x86_mmx @stack_fold_pfmax(x86_mmx %a, x86_mmx %b) { 133; CHECK-LABEL: stack_fold_pfmax: 134; CHECK: # %bb.0: 135; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 136; CHECK-NEXT: #APP 137; CHECK-NEXT: nop 138; CHECK-NEXT: #NO_APP 139; CHECK-NEXT: pfmax {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 140; CHECK-NEXT: movq2dq %mm0, %xmm0 141; CHECK-NEXT: retq 142 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 143 %2 = call x86_mmx @llvm.x86.3dnow.pfmax(x86_mmx %a, x86_mmx %b) nounwind readnone 144 ret x86_mmx %2 145} 146declare x86_mmx @llvm.x86.3dnow.pfmax(x86_mmx, x86_mmx) nounwind readnone 147 148define x86_mmx @stack_fold_pfmin(x86_mmx %a, x86_mmx %b) { 149; CHECK-LABEL: stack_fold_pfmin: 150; CHECK: # %bb.0: 151; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 152; CHECK-NEXT: #APP 153; CHECK-NEXT: nop 154; CHECK-NEXT: #NO_APP 155; CHECK-NEXT: pfmin {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 156; CHECK-NEXT: movq2dq %mm0, %xmm0 157; CHECK-NEXT: retq 158 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 159 %2 = call x86_mmx @llvm.x86.3dnow.pfmin(x86_mmx %a, x86_mmx %b) nounwind readnone 160 ret x86_mmx %2 161} 162declare x86_mmx @llvm.x86.3dnow.pfmin(x86_mmx, x86_mmx) nounwind readnone 163 164define x86_mmx @stack_fold_pfmul(x86_mmx %a, x86_mmx %b) { 165; CHECK-LABEL: stack_fold_pfmul: 166; CHECK: # %bb.0: 167; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 168; CHECK-NEXT: #APP 169; CHECK-NEXT: nop 170; CHECK-NEXT: #NO_APP 171; CHECK-NEXT: pfmul {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 172; CHECK-NEXT: movq2dq %mm0, %xmm0 173; CHECK-NEXT: retq 174 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 175 %2 = call x86_mmx @llvm.x86.3dnow.pfmul(x86_mmx %a, x86_mmx %b) nounwind readnone 176 ret x86_mmx %2 177} 178declare x86_mmx @llvm.x86.3dnow.pfmul(x86_mmx, x86_mmx) nounwind readnone 179 180define x86_mmx @stack_fold_pfnacc(x86_mmx %a, x86_mmx %b) { 181; CHECK-LABEL: stack_fold_pfnacc: 182; CHECK: # %bb.0: 183; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 184; CHECK-NEXT: #APP 185; CHECK-NEXT: nop 186; CHECK-NEXT: #NO_APP 187; CHECK-NEXT: pfnacc {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 188; CHECK-NEXT: movq2dq %mm0, %xmm0 189; CHECK-NEXT: retq 190 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 191 %2 = call x86_mmx @llvm.x86.3dnowa.pfnacc(x86_mmx %a, x86_mmx %b) nounwind readnone 192 ret x86_mmx %2 193} 194declare x86_mmx @llvm.x86.3dnowa.pfnacc(x86_mmx, x86_mmx) nounwind readnone 195 196define x86_mmx @stack_fold_pfpnacc(x86_mmx %a, x86_mmx %b) { 197; CHECK-LABEL: stack_fold_pfpnacc: 198; CHECK: # %bb.0: 199; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 200; CHECK-NEXT: #APP 201; CHECK-NEXT: nop 202; CHECK-NEXT: #NO_APP 203; CHECK-NEXT: pfpnacc {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 204; CHECK-NEXT: movq2dq %mm0, %xmm0 205; CHECK-NEXT: retq 206 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 207 %2 = call x86_mmx @llvm.x86.3dnowa.pfpnacc(x86_mmx %a, x86_mmx %b) nounwind readnone 208 ret x86_mmx %2 209} 210declare x86_mmx @llvm.x86.3dnowa.pfpnacc(x86_mmx, x86_mmx) nounwind readnone 211 212define x86_mmx @stack_fold_pfrcp(x86_mmx %a) { 213; CHECK-LABEL: stack_fold_pfrcp: 214; CHECK: # %bb.0: 215; CHECK-NEXT: movq %mm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 216; CHECK-NEXT: #APP 217; CHECK-NEXT: nop 218; CHECK-NEXT: #NO_APP 219; CHECK-NEXT: pfrcp {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 220; CHECK-NEXT: movq2dq %mm0, %xmm0 221; CHECK-NEXT: retq 222 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 223 %2 = call x86_mmx @llvm.x86.3dnow.pfrcp(x86_mmx %a) nounwind readnone 224 ret x86_mmx %2 225} 226declare x86_mmx @llvm.x86.3dnow.pfrcp(x86_mmx) nounwind readnone 227 228define x86_mmx @stack_fold_pfrcpit1(x86_mmx %a, x86_mmx %b) { 229; CHECK-LABEL: stack_fold_pfrcpit1: 230; CHECK: # %bb.0: 231; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 232; CHECK-NEXT: #APP 233; CHECK-NEXT: nop 234; CHECK-NEXT: #NO_APP 235; CHECK-NEXT: pfrcpit1 {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 236; CHECK-NEXT: movq2dq %mm0, %xmm0 237; CHECK-NEXT: retq 238 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 239 %2 = call x86_mmx @llvm.x86.3dnow.pfrcpit1(x86_mmx %a, x86_mmx %b) nounwind readnone 240 ret x86_mmx %2 241} 242declare x86_mmx @llvm.x86.3dnow.pfrcpit1(x86_mmx, x86_mmx) nounwind readnone 243 244define x86_mmx @stack_fold_pfrcpit2(x86_mmx %a, x86_mmx %b) { 245; CHECK-LABEL: stack_fold_pfrcpit2: 246; CHECK: # %bb.0: 247; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 248; CHECK-NEXT: #APP 249; CHECK-NEXT: nop 250; CHECK-NEXT: #NO_APP 251; CHECK-NEXT: pfrcpit2 {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 252; CHECK-NEXT: movq2dq %mm0, %xmm0 253; CHECK-NEXT: retq 254 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 255 %2 = call x86_mmx @llvm.x86.3dnow.pfrcpit2(x86_mmx %a, x86_mmx %b) nounwind readnone 256 ret x86_mmx %2 257} 258declare x86_mmx @llvm.x86.3dnow.pfrcpit2(x86_mmx, x86_mmx) nounwind readnone 259 260define x86_mmx @stack_fold_pfrsqit1(x86_mmx %a, x86_mmx %b) { 261; CHECK-LABEL: stack_fold_pfrsqit1: 262; CHECK: # %bb.0: 263; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 264; CHECK-NEXT: #APP 265; CHECK-NEXT: nop 266; CHECK-NEXT: #NO_APP 267; CHECK-NEXT: pfrsqit1 {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 268; CHECK-NEXT: movq2dq %mm0, %xmm0 269; CHECK-NEXT: retq 270 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 271 %2 = call x86_mmx @llvm.x86.3dnow.pfrsqit1(x86_mmx %a, x86_mmx %b) nounwind readnone 272 ret x86_mmx %2 273} 274declare x86_mmx @llvm.x86.3dnow.pfrsqit1(x86_mmx, x86_mmx) nounwind readnone 275 276define x86_mmx @stack_fold_pfrsqrt(x86_mmx %a) { 277; CHECK-LABEL: stack_fold_pfrsqrt: 278; CHECK: # %bb.0: 279; CHECK-NEXT: movq %mm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 280; CHECK-NEXT: #APP 281; CHECK-NEXT: nop 282; CHECK-NEXT: #NO_APP 283; CHECK-NEXT: pfrsqrt {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 284; CHECK-NEXT: movq2dq %mm0, %xmm0 285; CHECK-NEXT: retq 286 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 287 %2 = call x86_mmx @llvm.x86.3dnow.pfrsqrt(x86_mmx %a) nounwind readnone 288 ret x86_mmx %2 289} 290declare x86_mmx @llvm.x86.3dnow.pfrsqrt(x86_mmx) nounwind readnone 291 292define x86_mmx @stack_fold_pfsub(x86_mmx %a, x86_mmx %b) { 293; CHECK-LABEL: stack_fold_pfsub: 294; CHECK: # %bb.0: 295; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 296; CHECK-NEXT: #APP 297; CHECK-NEXT: nop 298; CHECK-NEXT: #NO_APP 299; CHECK-NEXT: pfsub {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 300; CHECK-NEXT: movq2dq %mm0, %xmm0 301; CHECK-NEXT: retq 302 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 303 %2 = call x86_mmx @llvm.x86.3dnow.pfsub(x86_mmx %a, x86_mmx %b) nounwind readnone 304 ret x86_mmx %2 305} 306declare x86_mmx @llvm.x86.3dnow.pfsub(x86_mmx, x86_mmx) nounwind readnone 307 308define x86_mmx @stack_fold_pfsubr(x86_mmx %a, x86_mmx %b) { 309; CHECK-LABEL: stack_fold_pfsubr: 310; CHECK: # %bb.0: 311; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 312; CHECK-NEXT: #APP 313; CHECK-NEXT: nop 314; CHECK-NEXT: #NO_APP 315; CHECK-NEXT: pfsubr {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 316; CHECK-NEXT: movq2dq %mm0, %xmm0 317; CHECK-NEXT: retq 318 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 319 %2 = call x86_mmx @llvm.x86.3dnow.pfsubr(x86_mmx %a, x86_mmx %b) nounwind readnone 320 ret x86_mmx %2 321} 322declare x86_mmx @llvm.x86.3dnow.pfsubr(x86_mmx, x86_mmx) nounwind readnone 323 324define x86_mmx @stack_fold_pi2fd(x86_mmx %a) { 325; CHECK-LABEL: stack_fold_pi2fd: 326; CHECK: # %bb.0: 327; CHECK-NEXT: movq %mm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 328; CHECK-NEXT: #APP 329; CHECK-NEXT: nop 330; CHECK-NEXT: #NO_APP 331; CHECK-NEXT: pi2fd {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 332; CHECK-NEXT: movq2dq %mm0, %xmm0 333; CHECK-NEXT: retq 334 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 335 %2 = call x86_mmx @llvm.x86.3dnow.pi2fd(x86_mmx %a) nounwind readnone 336 ret x86_mmx %2 337} 338declare x86_mmx @llvm.x86.3dnow.pi2fd(x86_mmx) nounwind readnone 339 340define x86_mmx @stack_fold_pi2fw(x86_mmx %a) { 341; CHECK-LABEL: stack_fold_pi2fw: 342; CHECK: # %bb.0: 343; CHECK-NEXT: movq %mm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 344; CHECK-NEXT: #APP 345; CHECK-NEXT: nop 346; CHECK-NEXT: #NO_APP 347; CHECK-NEXT: pi2fw {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 348; CHECK-NEXT: movq2dq %mm0, %xmm0 349; CHECK-NEXT: retq 350 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 351 %2 = call x86_mmx @llvm.x86.3dnowa.pi2fw(x86_mmx %a) nounwind readnone 352 ret x86_mmx %2 353} 354declare x86_mmx @llvm.x86.3dnowa.pi2fw(x86_mmx) nounwind readnone 355 356define x86_mmx @stack_fold_pmulhrw(x86_mmx %a, x86_mmx %b) { 357; CHECK-LABEL: stack_fold_pmulhrw: 358; CHECK: # %bb.0: 359; CHECK-NEXT: movq %mm1, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 360; CHECK-NEXT: #APP 361; CHECK-NEXT: nop 362; CHECK-NEXT: #NO_APP 363; CHECK-NEXT: pmulhrw {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 364; CHECK-NEXT: movq2dq %mm0, %xmm0 365; CHECK-NEXT: retq 366 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 367 %2 = call x86_mmx @llvm.x86.3dnow.pmulhrw(x86_mmx %a, x86_mmx %b) nounwind readnone 368 ret x86_mmx %2 369} 370declare x86_mmx @llvm.x86.3dnow.pmulhrw(x86_mmx, x86_mmx) nounwind readnone 371 372define x86_mmx @stack_fold_pswapd(x86_mmx %a) { 373; CHECK-LABEL: stack_fold_pswapd: 374; CHECK: # %bb.0: 375; CHECK-NEXT: movq %mm0, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill 376; CHECK-NEXT: #APP 377; CHECK-NEXT: nop 378; CHECK-NEXT: #NO_APP 379; CHECK-NEXT: pswapd {{[-0-9]+}}(%r{{[sb]}}p), %mm0 # 8-byte Folded Reload 380; CHECK-NEXT: # mm0 = mem[1,0] 381; CHECK-NEXT: movq2dq %mm0, %xmm0 382; CHECK-NEXT: retq 383 %1 = tail call x86_mmx asm sideeffect "nop", "=y,~{mm1},~{mm2},~{mm3},~{mm4},~{mm5},~{mm6},~{mm7}"() 384 %2 = call x86_mmx @llvm.x86.3dnowa.pswapd(x86_mmx %a) nounwind readnone 385 ret x86_mmx %2 386} 387declare x86_mmx @llvm.x86.3dnowa.pswapd(x86_mmx) nounwind readnone 388