1; RUN: llc -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names  -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
2define signext i32 @foo(<4 x float> %__A) {
3entry:
4  %0 = tail call { i32, <4 x float> } asm "xxsldwi ${1:x},${2:x},${2:x},3;\0Axscvspdp ${1:x},${1:x};\0Afctiw  $1,$1;\0Amfvsrd  $0,${1:x};\0A", "=r,=&^wa,^wa"(<4 x float> %__A)
5  %asmresult = extractvalue { i32, <4 x float> } %0, 0
6  ret i32 %asmresult
7; CHECK-LABEL: foo:
8; CHECK: #APP
9; CHECK: xxsldwi vs0, v2, v2, 3
10; CHECK: xscvspdp f0, f0
11; CHECK: fctiw f0, f0
12; CHECK: mffprd r3, f0
13; CHECK: #NO_APP
14}
15
16define signext i32 @foo1(<4 x float> %__A) {
17entry:
18  %0 = tail call { i32, <4 x float> } asm "xxsldwi ${1:x},${2:x},${2:x},3;\0Axscvspdp ${1:x},${1:x};\0Afctiw  $1,$1;\0Amfvsrd  $0,${1:x};\0A", "=r,=&^wi,^wa"(<4 x float> %__A)
19  %asmresult = extractvalue { i32, <4 x float> } %0, 0
20  ret i32 %asmresult
21
22; CHECK-LABEL: foo1:
23; CHECK: #APP
24; CHECK: xxsldwi vs0, v2, v2, 3
25; CHECK: xscvspdp f0, f0
26; CHECK: fctiw f0, f0
27; CHECK: mffprd r3, f0
28; CHECK: #NO_APP
29; CHECK: extsw r3, r3
30}
31
32define double @test() {
33  entry:
34    %0 = tail call double asm "mtvsrd ${0:x}, 1", "=^ws,~{f0},~{f1},~{f2},~{f3},~{f4},~{f5},~{f6},~{f7},~{f8},~{f9},~{f10},~{f11},~{f12},~{f13},~{f14}"()
35    ret double %0
36; CHECK-LABEL: test:
37; CHECK: #APP
38; CHECK: mtvsrd v2, r1
39; CHECK: #NO_APP
40}
41
42define float @test_ww(float %x, float %y) {
43  %1 = tail call float asm "xsmaxdp ${0:x}, ${1:x}, ${2:x}", "=^ww,^ww,^ww"(float %x, float %y)
44  ret float %1
45; CHECK-LABEL: test_ww:
46; CHECK: #APP
47; CHECK: xsmaxdp f1, f1, f2
48; CHECK: #NO_APP
49}
50