brintos

brintos / llvm-project-archived public Read only

0
0
Text · 111.3 KiB · 03bc39a Raw
3143 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mattr=+sve -force-streaming-compatible  < %s | FileCheck %s3; RUN: llc -mattr=+sme -force-streaming  < %s | FileCheck %s4; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE5 6target triple = "aarch64-unknown-linux-gnu"7 8;9; CEIL -> FRINTP10;11 12define <2 x half> @frintp_v2f16(<2 x half> %op) {13; CHECK-LABEL: frintp_v2f16:14; CHECK:       // %bb.0:15; CHECK-NEXT:    ptrue p0.h, vl416; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z017; CHECK-NEXT:    frintp z0.h, p0/m, z0.h18; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z019; CHECK-NEXT:    ret20;21; NONEON-NOSVE-LABEL: frintp_v2f16:22; NONEON-NOSVE:       // %bb.0:23; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!24; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 1625; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]26; NONEON-NOSVE-NEXT:    fcvt s0, h027; NONEON-NOSVE-NEXT:    frintp s0, s028; NONEON-NOSVE-NEXT:    fcvt h0, s029; NONEON-NOSVE-NEXT:    str h0, [sp, #14]30; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]31; NONEON-NOSVE-NEXT:    fcvt s0, h032; NONEON-NOSVE-NEXT:    frintp s0, s033; NONEON-NOSVE-NEXT:    fcvt h0, s034; NONEON-NOSVE-NEXT:    str h0, [sp, #12]35; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]36; NONEON-NOSVE-NEXT:    fcvt s0, h037; NONEON-NOSVE-NEXT:    frintp s0, s038; NONEON-NOSVE-NEXT:    fcvt h0, s039; NONEON-NOSVE-NEXT:    str h0, [sp, #10]40; NONEON-NOSVE-NEXT:    ldr h0, [sp]41; NONEON-NOSVE-NEXT:    fcvt s0, h042; NONEON-NOSVE-NEXT:    frintp s0, s043; NONEON-NOSVE-NEXT:    fcvt h0, s044; NONEON-NOSVE-NEXT:    str h0, [sp, #8]45; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]46; NONEON-NOSVE-NEXT:    add sp, sp, #1647; NONEON-NOSVE-NEXT:    ret48  %res = call <2 x half> @llvm.ceil.v2f16(<2 x half> %op)49  ret <2 x half> %res50}51 52define <4 x half> @frintp_v4f16(<4 x half> %op) {53; CHECK-LABEL: frintp_v4f16:54; CHECK:       // %bb.0:55; CHECK-NEXT:    ptrue p0.h, vl456; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z057; CHECK-NEXT:    frintp z0.h, p0/m, z0.h58; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z059; CHECK-NEXT:    ret60;61; NONEON-NOSVE-LABEL: frintp_v4f16:62; NONEON-NOSVE:       // %bb.0:63; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!64; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 1665; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]66; NONEON-NOSVE-NEXT:    fcvt s0, h067; NONEON-NOSVE-NEXT:    frintp s0, s068; NONEON-NOSVE-NEXT:    fcvt h0, s069; NONEON-NOSVE-NEXT:    str h0, [sp, #14]70; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]71; NONEON-NOSVE-NEXT:    fcvt s0, h072; NONEON-NOSVE-NEXT:    frintp s0, s073; NONEON-NOSVE-NEXT:    fcvt h0, s074; NONEON-NOSVE-NEXT:    str h0, [sp, #12]75; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]76; NONEON-NOSVE-NEXT:    fcvt s0, h077; NONEON-NOSVE-NEXT:    frintp s0, s078; NONEON-NOSVE-NEXT:    fcvt h0, s079; NONEON-NOSVE-NEXT:    str h0, [sp, #10]80; NONEON-NOSVE-NEXT:    ldr h0, [sp]81; NONEON-NOSVE-NEXT:    fcvt s0, h082; NONEON-NOSVE-NEXT:    frintp s0, s083; NONEON-NOSVE-NEXT:    fcvt h0, s084; NONEON-NOSVE-NEXT:    str h0, [sp, #8]85; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]86; NONEON-NOSVE-NEXT:    add sp, sp, #1687; NONEON-NOSVE-NEXT:    ret88  %res = call <4 x half> @llvm.ceil.v4f16(<4 x half> %op)89  ret <4 x half> %res90}91 92define <8 x half> @frintp_v8f16(<8 x half> %op) {93; CHECK-LABEL: frintp_v8f16:94; CHECK:       // %bb.0:95; CHECK-NEXT:    ptrue p0.h, vl896; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z097; CHECK-NEXT:    frintp z0.h, p0/m, z0.h98; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z099; CHECK-NEXT:    ret100;101; NONEON-NOSVE-LABEL: frintp_v8f16:102; NONEON-NOSVE:       // %bb.0:103; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!104; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32105; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]106; NONEON-NOSVE-NEXT:    fcvt s0, h0107; NONEON-NOSVE-NEXT:    frintp s0, s0108; NONEON-NOSVE-NEXT:    fcvt h0, s0109; NONEON-NOSVE-NEXT:    str h0, [sp, #30]110; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]111; NONEON-NOSVE-NEXT:    fcvt s0, h0112; NONEON-NOSVE-NEXT:    frintp s0, s0113; NONEON-NOSVE-NEXT:    fcvt h0, s0114; NONEON-NOSVE-NEXT:    str h0, [sp, #28]115; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]116; NONEON-NOSVE-NEXT:    fcvt s0, h0117; NONEON-NOSVE-NEXT:    frintp s0, s0118; NONEON-NOSVE-NEXT:    fcvt h0, s0119; NONEON-NOSVE-NEXT:    str h0, [sp, #26]120; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]121; NONEON-NOSVE-NEXT:    fcvt s0, h0122; NONEON-NOSVE-NEXT:    frintp s0, s0123; NONEON-NOSVE-NEXT:    fcvt h0, s0124; NONEON-NOSVE-NEXT:    str h0, [sp, #24]125; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]126; NONEON-NOSVE-NEXT:    fcvt s0, h0127; NONEON-NOSVE-NEXT:    frintp s0, s0128; NONEON-NOSVE-NEXT:    fcvt h0, s0129; NONEON-NOSVE-NEXT:    str h0, [sp, #22]130; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]131; NONEON-NOSVE-NEXT:    fcvt s0, h0132; NONEON-NOSVE-NEXT:    frintp s0, s0133; NONEON-NOSVE-NEXT:    fcvt h0, s0134; NONEON-NOSVE-NEXT:    str h0, [sp, #20]135; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]136; NONEON-NOSVE-NEXT:    fcvt s0, h0137; NONEON-NOSVE-NEXT:    frintp s0, s0138; NONEON-NOSVE-NEXT:    fcvt h0, s0139; NONEON-NOSVE-NEXT:    str h0, [sp, #18]140; NONEON-NOSVE-NEXT:    ldr h0, [sp]141; NONEON-NOSVE-NEXT:    fcvt s0, h0142; NONEON-NOSVE-NEXT:    frintp s0, s0143; NONEON-NOSVE-NEXT:    fcvt h0, s0144; NONEON-NOSVE-NEXT:    str h0, [sp, #16]145; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]146; NONEON-NOSVE-NEXT:    add sp, sp, #32147; NONEON-NOSVE-NEXT:    ret148  %res = call <8 x half> @llvm.ceil.v8f16(<8 x half> %op)149  ret <8 x half> %res150}151 152define void @frintp_v16f16(ptr %a) {153; CHECK-LABEL: frintp_v16f16:154; CHECK:       // %bb.0:155; CHECK-NEXT:    ldp q0, q1, [x0]156; CHECK-NEXT:    ptrue p0.h, vl8157; CHECK-NEXT:    frintp z0.h, p0/m, z0.h158; CHECK-NEXT:    frintp z1.h, p0/m, z1.h159; CHECK-NEXT:    stp q0, q1, [x0]160; CHECK-NEXT:    ret161;162; NONEON-NOSVE-LABEL: frintp_v16f16:163; NONEON-NOSVE:       // %bb.0:164; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]165; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!166; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 64167; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]168; NONEON-NOSVE-NEXT:    fcvt s0, h0169; NONEON-NOSVE-NEXT:    frintp s0, s0170; NONEON-NOSVE-NEXT:    fcvt h0, s0171; NONEON-NOSVE-NEXT:    str h0, [sp, #62]172; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]173; NONEON-NOSVE-NEXT:    fcvt s0, h0174; NONEON-NOSVE-NEXT:    frintp s0, s0175; NONEON-NOSVE-NEXT:    fcvt h0, s0176; NONEON-NOSVE-NEXT:    str h0, [sp, #60]177; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]178; NONEON-NOSVE-NEXT:    fcvt s0, h0179; NONEON-NOSVE-NEXT:    frintp s0, s0180; NONEON-NOSVE-NEXT:    fcvt h0, s0181; NONEON-NOSVE-NEXT:    str h0, [sp, #58]182; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]183; NONEON-NOSVE-NEXT:    fcvt s0, h0184; NONEON-NOSVE-NEXT:    frintp s0, s0185; NONEON-NOSVE-NEXT:    fcvt h0, s0186; NONEON-NOSVE-NEXT:    str h0, [sp, #56]187; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]188; NONEON-NOSVE-NEXT:    fcvt s0, h0189; NONEON-NOSVE-NEXT:    frintp s0, s0190; NONEON-NOSVE-NEXT:    fcvt h0, s0191; NONEON-NOSVE-NEXT:    str h0, [sp, #54]192; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]193; NONEON-NOSVE-NEXT:    fcvt s0, h0194; NONEON-NOSVE-NEXT:    frintp s0, s0195; NONEON-NOSVE-NEXT:    fcvt h0, s0196; NONEON-NOSVE-NEXT:    str h0, [sp, #52]197; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]198; NONEON-NOSVE-NEXT:    fcvt s0, h0199; NONEON-NOSVE-NEXT:    frintp s0, s0200; NONEON-NOSVE-NEXT:    fcvt h0, s0201; NONEON-NOSVE-NEXT:    str h0, [sp, #50]202; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]203; NONEON-NOSVE-NEXT:    fcvt s0, h0204; NONEON-NOSVE-NEXT:    frintp s0, s0205; NONEON-NOSVE-NEXT:    fcvt h0, s0206; NONEON-NOSVE-NEXT:    str h0, [sp, #48]207; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]208; NONEON-NOSVE-NEXT:    fcvt s0, h0209; NONEON-NOSVE-NEXT:    frintp s0, s0210; NONEON-NOSVE-NEXT:    fcvt h0, s0211; NONEON-NOSVE-NEXT:    str h0, [sp, #46]212; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]213; NONEON-NOSVE-NEXT:    fcvt s0, h0214; NONEON-NOSVE-NEXT:    frintp s0, s0215; NONEON-NOSVE-NEXT:    fcvt h0, s0216; NONEON-NOSVE-NEXT:    str h0, [sp, #44]217; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]218; NONEON-NOSVE-NEXT:    fcvt s0, h0219; NONEON-NOSVE-NEXT:    frintp s0, s0220; NONEON-NOSVE-NEXT:    fcvt h0, s0221; NONEON-NOSVE-NEXT:    str h0, [sp, #42]222; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]223; NONEON-NOSVE-NEXT:    fcvt s0, h0224; NONEON-NOSVE-NEXT:    frintp s0, s0225; NONEON-NOSVE-NEXT:    fcvt h0, s0226; NONEON-NOSVE-NEXT:    str h0, [sp, #40]227; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]228; NONEON-NOSVE-NEXT:    fcvt s0, h0229; NONEON-NOSVE-NEXT:    frintp s0, s0230; NONEON-NOSVE-NEXT:    fcvt h0, s0231; NONEON-NOSVE-NEXT:    str h0, [sp, #38]232; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]233; NONEON-NOSVE-NEXT:    fcvt s0, h0234; NONEON-NOSVE-NEXT:    frintp s0, s0235; NONEON-NOSVE-NEXT:    fcvt h0, s0236; NONEON-NOSVE-NEXT:    str h0, [sp, #36]237; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]238; NONEON-NOSVE-NEXT:    fcvt s0, h0239; NONEON-NOSVE-NEXT:    frintp s0, s0240; NONEON-NOSVE-NEXT:    fcvt h0, s0241; NONEON-NOSVE-NEXT:    str h0, [sp, #34]242; NONEON-NOSVE-NEXT:    ldr h0, [sp]243; NONEON-NOSVE-NEXT:    fcvt s0, h0244; NONEON-NOSVE-NEXT:    frintp s0, s0245; NONEON-NOSVE-NEXT:    fcvt h0, s0246; NONEON-NOSVE-NEXT:    str h0, [sp, #32]247; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]248; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]249; NONEON-NOSVE-NEXT:    add sp, sp, #64250; NONEON-NOSVE-NEXT:    ret251  %op = load <16 x half>, ptr %a252  %res = call <16 x half> @llvm.ceil.v16f16(<16 x half> %op)253  store <16 x half> %res, ptr %a254  ret void255}256 257define <2 x float> @frintp_v2f32(<2 x float> %op) {258; CHECK-LABEL: frintp_v2f32:259; CHECK:       // %bb.0:260; CHECK-NEXT:    ptrue p0.s, vl2261; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z0262; CHECK-NEXT:    frintp z0.s, p0/m, z0.s263; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z0264; CHECK-NEXT:    ret265;266; NONEON-NOSVE-LABEL: frintp_v2f32:267; NONEON-NOSVE:       // %bb.0:268; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!269; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16270; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]271; NONEON-NOSVE-NEXT:    frintp s1, s0272; NONEON-NOSVE-NEXT:    ldr s0, [sp]273; NONEON-NOSVE-NEXT:    frintp s0, s0274; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #8]275; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]276; NONEON-NOSVE-NEXT:    add sp, sp, #16277; NONEON-NOSVE-NEXT:    ret278  %res = call <2 x float> @llvm.ceil.v2f32(<2 x float> %op)279  ret <2 x float> %res280}281 282define <4 x float> @frintp_v4f32(<4 x float> %op) {283; CHECK-LABEL: frintp_v4f32:284; CHECK:       // %bb.0:285; CHECK-NEXT:    ptrue p0.s, vl4286; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0287; CHECK-NEXT:    frintp z0.s, p0/m, z0.s288; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0289; CHECK-NEXT:    ret290;291; NONEON-NOSVE-LABEL: frintp_v4f32:292; NONEON-NOSVE:       // %bb.0:293; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!294; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32295; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]296; NONEON-NOSVE-NEXT:    frintp s1, s0297; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]298; NONEON-NOSVE-NEXT:    frintp s0, s0299; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #24]300; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]301; NONEON-NOSVE-NEXT:    frintp s1, s0302; NONEON-NOSVE-NEXT:    ldr s0, [sp]303; NONEON-NOSVE-NEXT:    frintp s0, s0304; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #16]305; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]306; NONEON-NOSVE-NEXT:    add sp, sp, #32307; NONEON-NOSVE-NEXT:    ret308  %res = call <4 x float> @llvm.ceil.v4f32(<4 x float> %op)309  ret <4 x float> %res310}311 312define void @frintp_v8f32(ptr %a) {313; CHECK-LABEL: frintp_v8f32:314; CHECK:       // %bb.0:315; CHECK-NEXT:    ldp q0, q1, [x0]316; CHECK-NEXT:    ptrue p0.s, vl4317; CHECK-NEXT:    frintp z0.s, p0/m, z0.s318; CHECK-NEXT:    frintp z1.s, p0/m, z1.s319; CHECK-NEXT:    stp q0, q1, [x0]320; CHECK-NEXT:    ret321;322; NONEON-NOSVE-LABEL: frintp_v8f32:323; NONEON-NOSVE:       // %bb.0:324; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]325; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!326; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 64327; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]328; NONEON-NOSVE-NEXT:    frintp s1, s0329; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]330; NONEON-NOSVE-NEXT:    frintp s0, s0331; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #56]332; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]333; NONEON-NOSVE-NEXT:    frintp s1, s0334; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]335; NONEON-NOSVE-NEXT:    frintp s0, s0336; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #48]337; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]338; NONEON-NOSVE-NEXT:    frintp s1, s0339; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]340; NONEON-NOSVE-NEXT:    frintp s0, s0341; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #40]342; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]343; NONEON-NOSVE-NEXT:    frintp s1, s0344; NONEON-NOSVE-NEXT:    ldr s0, [sp]345; NONEON-NOSVE-NEXT:    frintp s0, s0346; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #32]347; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]348; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]349; NONEON-NOSVE-NEXT:    add sp, sp, #64350; NONEON-NOSVE-NEXT:    ret351  %op = load <8 x float>, ptr %a352  %res = call <8 x float> @llvm.ceil.v8f32(<8 x float> %op)353  store <8 x float> %res, ptr %a354  ret void355}356 357define <1 x double> @frintp_v1f64(<1 x double> %op) {358; CHECK-LABEL: frintp_v1f64:359; CHECK:       // %bb.0:360; CHECK-NEXT:    frintp d0, d0361; CHECK-NEXT:    ret362;363; NONEON-NOSVE-LABEL: frintp_v1f64:364; NONEON-NOSVE:       // %bb.0:365; NONEON-NOSVE-NEXT:    sub sp, sp, #16366; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16367; NONEON-NOSVE-NEXT:    frintp d0, d0368; NONEON-NOSVE-NEXT:    str d0, [sp, #8]369; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]370; NONEON-NOSVE-NEXT:    add sp, sp, #16371; NONEON-NOSVE-NEXT:    ret372  %res = call <1 x double> @llvm.ceil.v1f64(<1 x double> %op)373  ret <1 x double> %res374}375 376define <2 x double> @frintp_v2f64(<2 x double> %op) {377; CHECK-LABEL: frintp_v2f64:378; CHECK:       // %bb.0:379; CHECK-NEXT:    ptrue p0.d, vl2380; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0381; CHECK-NEXT:    frintp z0.d, p0/m, z0.d382; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0383; CHECK-NEXT:    ret384;385; NONEON-NOSVE-LABEL: frintp_v2f64:386; NONEON-NOSVE:       // %bb.0:387; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!388; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32389; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]390; NONEON-NOSVE-NEXT:    frintp d1, d0391; NONEON-NOSVE-NEXT:    ldr d0, [sp]392; NONEON-NOSVE-NEXT:    frintp d0, d0393; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #16]394; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]395; NONEON-NOSVE-NEXT:    add sp, sp, #32396; NONEON-NOSVE-NEXT:    ret397  %res = call <2 x double> @llvm.ceil.v2f64(<2 x double> %op)398  ret <2 x double> %res399}400 401define void @frintp_v4f64(ptr %a) {402; CHECK-LABEL: frintp_v4f64:403; CHECK:       // %bb.0:404; CHECK-NEXT:    ldp q0, q1, [x0]405; CHECK-NEXT:    ptrue p0.d, vl2406; CHECK-NEXT:    frintp z0.d, p0/m, z0.d407; CHECK-NEXT:    frintp z1.d, p0/m, z1.d408; CHECK-NEXT:    stp q0, q1, [x0]409; CHECK-NEXT:    ret410;411; NONEON-NOSVE-LABEL: frintp_v4f64:412; NONEON-NOSVE:       // %bb.0:413; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]414; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!415; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 64416; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]417; NONEON-NOSVE-NEXT:    frintp d1, d0418; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]419; NONEON-NOSVE-NEXT:    frintp d0, d0420; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #48]421; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]422; NONEON-NOSVE-NEXT:    frintp d1, d0423; NONEON-NOSVE-NEXT:    ldr d0, [sp]424; NONEON-NOSVE-NEXT:    frintp d0, d0425; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #32]426; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]427; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]428; NONEON-NOSVE-NEXT:    add sp, sp, #64429; NONEON-NOSVE-NEXT:    ret430  %op = load <4 x double>, ptr %a431  %res = call <4 x double> @llvm.ceil.v4f64(<4 x double> %op)432  store <4 x double> %res, ptr %a433  ret void434}435 436;437; FLOOR -> FRINTM438;439 440define <2 x half> @frintm_v2f16(<2 x half> %op) {441; CHECK-LABEL: frintm_v2f16:442; CHECK:       // %bb.0:443; CHECK-NEXT:    ptrue p0.h, vl4444; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z0445; CHECK-NEXT:    frintm z0.h, p0/m, z0.h446; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z0447; CHECK-NEXT:    ret448;449; NONEON-NOSVE-LABEL: frintm_v2f16:450; NONEON-NOSVE:       // %bb.0:451; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!452; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16453; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]454; NONEON-NOSVE-NEXT:    fcvt s0, h0455; NONEON-NOSVE-NEXT:    frintm s0, s0456; NONEON-NOSVE-NEXT:    fcvt h0, s0457; NONEON-NOSVE-NEXT:    str h0, [sp, #14]458; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]459; NONEON-NOSVE-NEXT:    fcvt s0, h0460; NONEON-NOSVE-NEXT:    frintm s0, s0461; NONEON-NOSVE-NEXT:    fcvt h0, s0462; NONEON-NOSVE-NEXT:    str h0, [sp, #12]463; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]464; NONEON-NOSVE-NEXT:    fcvt s0, h0465; NONEON-NOSVE-NEXT:    frintm s0, s0466; NONEON-NOSVE-NEXT:    fcvt h0, s0467; NONEON-NOSVE-NEXT:    str h0, [sp, #10]468; NONEON-NOSVE-NEXT:    ldr h0, [sp]469; NONEON-NOSVE-NEXT:    fcvt s0, h0470; NONEON-NOSVE-NEXT:    frintm s0, s0471; NONEON-NOSVE-NEXT:    fcvt h0, s0472; NONEON-NOSVE-NEXT:    str h0, [sp, #8]473; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]474; NONEON-NOSVE-NEXT:    add sp, sp, #16475; NONEON-NOSVE-NEXT:    ret476  %res = call <2 x half> @llvm.floor.v2f16(<2 x half> %op)477  ret <2 x half> %res478}479 480define <4 x half> @frintm_v4f16(<4 x half> %op) {481; CHECK-LABEL: frintm_v4f16:482; CHECK:       // %bb.0:483; CHECK-NEXT:    ptrue p0.h, vl4484; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z0485; CHECK-NEXT:    frintm z0.h, p0/m, z0.h486; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z0487; CHECK-NEXT:    ret488;489; NONEON-NOSVE-LABEL: frintm_v4f16:490; NONEON-NOSVE:       // %bb.0:491; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!492; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16493; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]494; NONEON-NOSVE-NEXT:    fcvt s0, h0495; NONEON-NOSVE-NEXT:    frintm s0, s0496; NONEON-NOSVE-NEXT:    fcvt h0, s0497; NONEON-NOSVE-NEXT:    str h0, [sp, #14]498; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]499; NONEON-NOSVE-NEXT:    fcvt s0, h0500; NONEON-NOSVE-NEXT:    frintm s0, s0501; NONEON-NOSVE-NEXT:    fcvt h0, s0502; NONEON-NOSVE-NEXT:    str h0, [sp, #12]503; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]504; NONEON-NOSVE-NEXT:    fcvt s0, h0505; NONEON-NOSVE-NEXT:    frintm s0, s0506; NONEON-NOSVE-NEXT:    fcvt h0, s0507; NONEON-NOSVE-NEXT:    str h0, [sp, #10]508; NONEON-NOSVE-NEXT:    ldr h0, [sp]509; NONEON-NOSVE-NEXT:    fcvt s0, h0510; NONEON-NOSVE-NEXT:    frintm s0, s0511; NONEON-NOSVE-NEXT:    fcvt h0, s0512; NONEON-NOSVE-NEXT:    str h0, [sp, #8]513; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]514; NONEON-NOSVE-NEXT:    add sp, sp, #16515; NONEON-NOSVE-NEXT:    ret516  %res = call <4 x half> @llvm.floor.v4f16(<4 x half> %op)517  ret <4 x half> %res518}519 520define <8 x half> @frintm_v8f16(<8 x half> %op) {521; CHECK-LABEL: frintm_v8f16:522; CHECK:       // %bb.0:523; CHECK-NEXT:    ptrue p0.h, vl8524; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0525; CHECK-NEXT:    frintm z0.h, p0/m, z0.h526; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0527; CHECK-NEXT:    ret528;529; NONEON-NOSVE-LABEL: frintm_v8f16:530; NONEON-NOSVE:       // %bb.0:531; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!532; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32533; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]534; NONEON-NOSVE-NEXT:    fcvt s0, h0535; NONEON-NOSVE-NEXT:    frintm s0, s0536; NONEON-NOSVE-NEXT:    fcvt h0, s0537; NONEON-NOSVE-NEXT:    str h0, [sp, #30]538; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]539; NONEON-NOSVE-NEXT:    fcvt s0, h0540; NONEON-NOSVE-NEXT:    frintm s0, s0541; NONEON-NOSVE-NEXT:    fcvt h0, s0542; NONEON-NOSVE-NEXT:    str h0, [sp, #28]543; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]544; NONEON-NOSVE-NEXT:    fcvt s0, h0545; NONEON-NOSVE-NEXT:    frintm s0, s0546; NONEON-NOSVE-NEXT:    fcvt h0, s0547; NONEON-NOSVE-NEXT:    str h0, [sp, #26]548; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]549; NONEON-NOSVE-NEXT:    fcvt s0, h0550; NONEON-NOSVE-NEXT:    frintm s0, s0551; NONEON-NOSVE-NEXT:    fcvt h0, s0552; NONEON-NOSVE-NEXT:    str h0, [sp, #24]553; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]554; NONEON-NOSVE-NEXT:    fcvt s0, h0555; NONEON-NOSVE-NEXT:    frintm s0, s0556; NONEON-NOSVE-NEXT:    fcvt h0, s0557; NONEON-NOSVE-NEXT:    str h0, [sp, #22]558; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]559; NONEON-NOSVE-NEXT:    fcvt s0, h0560; NONEON-NOSVE-NEXT:    frintm s0, s0561; NONEON-NOSVE-NEXT:    fcvt h0, s0562; NONEON-NOSVE-NEXT:    str h0, [sp, #20]563; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]564; NONEON-NOSVE-NEXT:    fcvt s0, h0565; NONEON-NOSVE-NEXT:    frintm s0, s0566; NONEON-NOSVE-NEXT:    fcvt h0, s0567; NONEON-NOSVE-NEXT:    str h0, [sp, #18]568; NONEON-NOSVE-NEXT:    ldr h0, [sp]569; NONEON-NOSVE-NEXT:    fcvt s0, h0570; NONEON-NOSVE-NEXT:    frintm s0, s0571; NONEON-NOSVE-NEXT:    fcvt h0, s0572; NONEON-NOSVE-NEXT:    str h0, [sp, #16]573; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]574; NONEON-NOSVE-NEXT:    add sp, sp, #32575; NONEON-NOSVE-NEXT:    ret576  %res = call <8 x half> @llvm.floor.v8f16(<8 x half> %op)577  ret <8 x half> %res578}579 580define void @frintm_v16f16(ptr %a) {581; CHECK-LABEL: frintm_v16f16:582; CHECK:       // %bb.0:583; CHECK-NEXT:    ldp q0, q1, [x0]584; CHECK-NEXT:    ptrue p0.h, vl8585; CHECK-NEXT:    frintm z0.h, p0/m, z0.h586; CHECK-NEXT:    frintm z1.h, p0/m, z1.h587; CHECK-NEXT:    stp q0, q1, [x0]588; CHECK-NEXT:    ret589;590; NONEON-NOSVE-LABEL: frintm_v16f16:591; NONEON-NOSVE:       // %bb.0:592; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]593; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!594; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 64595; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]596; NONEON-NOSVE-NEXT:    fcvt s0, h0597; NONEON-NOSVE-NEXT:    frintm s0, s0598; NONEON-NOSVE-NEXT:    fcvt h0, s0599; NONEON-NOSVE-NEXT:    str h0, [sp, #62]600; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]601; NONEON-NOSVE-NEXT:    fcvt s0, h0602; NONEON-NOSVE-NEXT:    frintm s0, s0603; NONEON-NOSVE-NEXT:    fcvt h0, s0604; NONEON-NOSVE-NEXT:    str h0, [sp, #60]605; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]606; NONEON-NOSVE-NEXT:    fcvt s0, h0607; NONEON-NOSVE-NEXT:    frintm s0, s0608; NONEON-NOSVE-NEXT:    fcvt h0, s0609; NONEON-NOSVE-NEXT:    str h0, [sp, #58]610; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]611; NONEON-NOSVE-NEXT:    fcvt s0, h0612; NONEON-NOSVE-NEXT:    frintm s0, s0613; NONEON-NOSVE-NEXT:    fcvt h0, s0614; NONEON-NOSVE-NEXT:    str h0, [sp, #56]615; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]616; NONEON-NOSVE-NEXT:    fcvt s0, h0617; NONEON-NOSVE-NEXT:    frintm s0, s0618; NONEON-NOSVE-NEXT:    fcvt h0, s0619; NONEON-NOSVE-NEXT:    str h0, [sp, #54]620; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]621; NONEON-NOSVE-NEXT:    fcvt s0, h0622; NONEON-NOSVE-NEXT:    frintm s0, s0623; NONEON-NOSVE-NEXT:    fcvt h0, s0624; NONEON-NOSVE-NEXT:    str h0, [sp, #52]625; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]626; NONEON-NOSVE-NEXT:    fcvt s0, h0627; NONEON-NOSVE-NEXT:    frintm s0, s0628; NONEON-NOSVE-NEXT:    fcvt h0, s0629; NONEON-NOSVE-NEXT:    str h0, [sp, #50]630; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]631; NONEON-NOSVE-NEXT:    fcvt s0, h0632; NONEON-NOSVE-NEXT:    frintm s0, s0633; NONEON-NOSVE-NEXT:    fcvt h0, s0634; NONEON-NOSVE-NEXT:    str h0, [sp, #48]635; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]636; NONEON-NOSVE-NEXT:    fcvt s0, h0637; NONEON-NOSVE-NEXT:    frintm s0, s0638; NONEON-NOSVE-NEXT:    fcvt h0, s0639; NONEON-NOSVE-NEXT:    str h0, [sp, #46]640; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]641; NONEON-NOSVE-NEXT:    fcvt s0, h0642; NONEON-NOSVE-NEXT:    frintm s0, s0643; NONEON-NOSVE-NEXT:    fcvt h0, s0644; NONEON-NOSVE-NEXT:    str h0, [sp, #44]645; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]646; NONEON-NOSVE-NEXT:    fcvt s0, h0647; NONEON-NOSVE-NEXT:    frintm s0, s0648; NONEON-NOSVE-NEXT:    fcvt h0, s0649; NONEON-NOSVE-NEXT:    str h0, [sp, #42]650; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]651; NONEON-NOSVE-NEXT:    fcvt s0, h0652; NONEON-NOSVE-NEXT:    frintm s0, s0653; NONEON-NOSVE-NEXT:    fcvt h0, s0654; NONEON-NOSVE-NEXT:    str h0, [sp, #40]655; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]656; NONEON-NOSVE-NEXT:    fcvt s0, h0657; NONEON-NOSVE-NEXT:    frintm s0, s0658; NONEON-NOSVE-NEXT:    fcvt h0, s0659; NONEON-NOSVE-NEXT:    str h0, [sp, #38]660; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]661; NONEON-NOSVE-NEXT:    fcvt s0, h0662; NONEON-NOSVE-NEXT:    frintm s0, s0663; NONEON-NOSVE-NEXT:    fcvt h0, s0664; NONEON-NOSVE-NEXT:    str h0, [sp, #36]665; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]666; NONEON-NOSVE-NEXT:    fcvt s0, h0667; NONEON-NOSVE-NEXT:    frintm s0, s0668; NONEON-NOSVE-NEXT:    fcvt h0, s0669; NONEON-NOSVE-NEXT:    str h0, [sp, #34]670; NONEON-NOSVE-NEXT:    ldr h0, [sp]671; NONEON-NOSVE-NEXT:    fcvt s0, h0672; NONEON-NOSVE-NEXT:    frintm s0, s0673; NONEON-NOSVE-NEXT:    fcvt h0, s0674; NONEON-NOSVE-NEXT:    str h0, [sp, #32]675; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]676; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]677; NONEON-NOSVE-NEXT:    add sp, sp, #64678; NONEON-NOSVE-NEXT:    ret679  %op = load <16 x half>, ptr %a680  %res = call <16 x half> @llvm.floor.v16f16(<16 x half> %op)681  store <16 x half> %res, ptr %a682  ret void683}684 685define <2 x float> @frintm_v2f32(<2 x float> %op) {686; CHECK-LABEL: frintm_v2f32:687; CHECK:       // %bb.0:688; CHECK-NEXT:    ptrue p0.s, vl2689; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z0690; CHECK-NEXT:    frintm z0.s, p0/m, z0.s691; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z0692; CHECK-NEXT:    ret693;694; NONEON-NOSVE-LABEL: frintm_v2f32:695; NONEON-NOSVE:       // %bb.0:696; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!697; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16698; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]699; NONEON-NOSVE-NEXT:    frintm s1, s0700; NONEON-NOSVE-NEXT:    ldr s0, [sp]701; NONEON-NOSVE-NEXT:    frintm s0, s0702; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #8]703; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]704; NONEON-NOSVE-NEXT:    add sp, sp, #16705; NONEON-NOSVE-NEXT:    ret706  %res = call <2 x float> @llvm.floor.v2f32(<2 x float> %op)707  ret <2 x float> %res708}709 710define <4 x float> @frintm_v4f32(<4 x float> %op) {711; CHECK-LABEL: frintm_v4f32:712; CHECK:       // %bb.0:713; CHECK-NEXT:    ptrue p0.s, vl4714; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0715; CHECK-NEXT:    frintm z0.s, p0/m, z0.s716; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0717; CHECK-NEXT:    ret718;719; NONEON-NOSVE-LABEL: frintm_v4f32:720; NONEON-NOSVE:       // %bb.0:721; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!722; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32723; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]724; NONEON-NOSVE-NEXT:    frintm s1, s0725; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]726; NONEON-NOSVE-NEXT:    frintm s0, s0727; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #24]728; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]729; NONEON-NOSVE-NEXT:    frintm s1, s0730; NONEON-NOSVE-NEXT:    ldr s0, [sp]731; NONEON-NOSVE-NEXT:    frintm s0, s0732; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #16]733; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]734; NONEON-NOSVE-NEXT:    add sp, sp, #32735; NONEON-NOSVE-NEXT:    ret736  %res = call <4 x float> @llvm.floor.v4f32(<4 x float> %op)737  ret <4 x float> %res738}739 740define void @frintm_v8f32(ptr %a) {741; CHECK-LABEL: frintm_v8f32:742; CHECK:       // %bb.0:743; CHECK-NEXT:    ldp q0, q1, [x0]744; CHECK-NEXT:    ptrue p0.s, vl4745; CHECK-NEXT:    frintm z0.s, p0/m, z0.s746; CHECK-NEXT:    frintm z1.s, p0/m, z1.s747; CHECK-NEXT:    stp q0, q1, [x0]748; CHECK-NEXT:    ret749;750; NONEON-NOSVE-LABEL: frintm_v8f32:751; NONEON-NOSVE:       // %bb.0:752; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]753; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!754; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 64755; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]756; NONEON-NOSVE-NEXT:    frintm s1, s0757; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]758; NONEON-NOSVE-NEXT:    frintm s0, s0759; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #56]760; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]761; NONEON-NOSVE-NEXT:    frintm s1, s0762; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]763; NONEON-NOSVE-NEXT:    frintm s0, s0764; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #48]765; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]766; NONEON-NOSVE-NEXT:    frintm s1, s0767; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]768; NONEON-NOSVE-NEXT:    frintm s0, s0769; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #40]770; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]771; NONEON-NOSVE-NEXT:    frintm s1, s0772; NONEON-NOSVE-NEXT:    ldr s0, [sp]773; NONEON-NOSVE-NEXT:    frintm s0, s0774; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #32]775; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]776; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]777; NONEON-NOSVE-NEXT:    add sp, sp, #64778; NONEON-NOSVE-NEXT:    ret779  %op = load <8 x float>, ptr %a780  %res = call <8 x float> @llvm.floor.v8f32(<8 x float> %op)781  store <8 x float> %res, ptr %a782  ret void783}784 785define <1 x double> @frintm_v1f64(<1 x double> %op) {786; CHECK-LABEL: frintm_v1f64:787; CHECK:       // %bb.0:788; CHECK-NEXT:    frintm d0, d0789; CHECK-NEXT:    ret790;791; NONEON-NOSVE-LABEL: frintm_v1f64:792; NONEON-NOSVE:       // %bb.0:793; NONEON-NOSVE-NEXT:    sub sp, sp, #16794; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16795; NONEON-NOSVE-NEXT:    frintm d0, d0796; NONEON-NOSVE-NEXT:    str d0, [sp, #8]797; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]798; NONEON-NOSVE-NEXT:    add sp, sp, #16799; NONEON-NOSVE-NEXT:    ret800  %res = call <1 x double> @llvm.floor.v1f64(<1 x double> %op)801  ret <1 x double> %res802}803 804define <2 x double> @frintm_v2f64(<2 x double> %op) {805; CHECK-LABEL: frintm_v2f64:806; CHECK:       // %bb.0:807; CHECK-NEXT:    ptrue p0.d, vl2808; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0809; CHECK-NEXT:    frintm z0.d, p0/m, z0.d810; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0811; CHECK-NEXT:    ret812;813; NONEON-NOSVE-LABEL: frintm_v2f64:814; NONEON-NOSVE:       // %bb.0:815; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!816; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32817; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]818; NONEON-NOSVE-NEXT:    frintm d1, d0819; NONEON-NOSVE-NEXT:    ldr d0, [sp]820; NONEON-NOSVE-NEXT:    frintm d0, d0821; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #16]822; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]823; NONEON-NOSVE-NEXT:    add sp, sp, #32824; NONEON-NOSVE-NEXT:    ret825  %res = call <2 x double> @llvm.floor.v2f64(<2 x double> %op)826  ret <2 x double> %res827}828 829define void @frintm_v4f64(ptr %a) {830; CHECK-LABEL: frintm_v4f64:831; CHECK:       // %bb.0:832; CHECK-NEXT:    ldp q0, q1, [x0]833; CHECK-NEXT:    ptrue p0.d, vl2834; CHECK-NEXT:    frintm z0.d, p0/m, z0.d835; CHECK-NEXT:    frintm z1.d, p0/m, z1.d836; CHECK-NEXT:    stp q0, q1, [x0]837; CHECK-NEXT:    ret838;839; NONEON-NOSVE-LABEL: frintm_v4f64:840; NONEON-NOSVE:       // %bb.0:841; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]842; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!843; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 64844; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]845; NONEON-NOSVE-NEXT:    frintm d1, d0846; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]847; NONEON-NOSVE-NEXT:    frintm d0, d0848; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #48]849; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]850; NONEON-NOSVE-NEXT:    frintm d1, d0851; NONEON-NOSVE-NEXT:    ldr d0, [sp]852; NONEON-NOSVE-NEXT:    frintm d0, d0853; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #32]854; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]855; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]856; NONEON-NOSVE-NEXT:    add sp, sp, #64857; NONEON-NOSVE-NEXT:    ret858  %op = load <4 x double>, ptr %a859  %res = call <4 x double> @llvm.floor.v4f64(<4 x double> %op)860  store <4 x double> %res, ptr %a861  ret void862}863 864;865; FNEARBYINT -> FRINTI866;867 868define <2 x half> @frinti_v2f16(<2 x half> %op) {869; CHECK-LABEL: frinti_v2f16:870; CHECK:       // %bb.0:871; CHECK-NEXT:    ptrue p0.h, vl4872; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z0873; CHECK-NEXT:    frinti z0.h, p0/m, z0.h874; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z0875; CHECK-NEXT:    ret876;877; NONEON-NOSVE-LABEL: frinti_v2f16:878; NONEON-NOSVE:       // %bb.0:879; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!880; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16881; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]882; NONEON-NOSVE-NEXT:    fcvt s0, h0883; NONEON-NOSVE-NEXT:    frinti s0, s0884; NONEON-NOSVE-NEXT:    fcvt h0, s0885; NONEON-NOSVE-NEXT:    str h0, [sp, #14]886; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]887; NONEON-NOSVE-NEXT:    fcvt s0, h0888; NONEON-NOSVE-NEXT:    frinti s0, s0889; NONEON-NOSVE-NEXT:    fcvt h0, s0890; NONEON-NOSVE-NEXT:    str h0, [sp, #12]891; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]892; NONEON-NOSVE-NEXT:    fcvt s0, h0893; NONEON-NOSVE-NEXT:    frinti s0, s0894; NONEON-NOSVE-NEXT:    fcvt h0, s0895; NONEON-NOSVE-NEXT:    str h0, [sp, #10]896; NONEON-NOSVE-NEXT:    ldr h0, [sp]897; NONEON-NOSVE-NEXT:    fcvt s0, h0898; NONEON-NOSVE-NEXT:    frinti s0, s0899; NONEON-NOSVE-NEXT:    fcvt h0, s0900; NONEON-NOSVE-NEXT:    str h0, [sp, #8]901; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]902; NONEON-NOSVE-NEXT:    add sp, sp, #16903; NONEON-NOSVE-NEXT:    ret904  %res = call <2 x half> @llvm.nearbyint.v2f16(<2 x half> %op)905  ret <2 x half> %res906}907 908define <4 x half> @frinti_v4f16(<4 x half> %op) {909; CHECK-LABEL: frinti_v4f16:910; CHECK:       // %bb.0:911; CHECK-NEXT:    ptrue p0.h, vl4912; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z0913; CHECK-NEXT:    frinti z0.h, p0/m, z0.h914; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z0915; CHECK-NEXT:    ret916;917; NONEON-NOSVE-LABEL: frinti_v4f16:918; NONEON-NOSVE:       // %bb.0:919; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!920; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16921; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]922; NONEON-NOSVE-NEXT:    fcvt s0, h0923; NONEON-NOSVE-NEXT:    frinti s0, s0924; NONEON-NOSVE-NEXT:    fcvt h0, s0925; NONEON-NOSVE-NEXT:    str h0, [sp, #14]926; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]927; NONEON-NOSVE-NEXT:    fcvt s0, h0928; NONEON-NOSVE-NEXT:    frinti s0, s0929; NONEON-NOSVE-NEXT:    fcvt h0, s0930; NONEON-NOSVE-NEXT:    str h0, [sp, #12]931; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]932; NONEON-NOSVE-NEXT:    fcvt s0, h0933; NONEON-NOSVE-NEXT:    frinti s0, s0934; NONEON-NOSVE-NEXT:    fcvt h0, s0935; NONEON-NOSVE-NEXT:    str h0, [sp, #10]936; NONEON-NOSVE-NEXT:    ldr h0, [sp]937; NONEON-NOSVE-NEXT:    fcvt s0, h0938; NONEON-NOSVE-NEXT:    frinti s0, s0939; NONEON-NOSVE-NEXT:    fcvt h0, s0940; NONEON-NOSVE-NEXT:    str h0, [sp, #8]941; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]942; NONEON-NOSVE-NEXT:    add sp, sp, #16943; NONEON-NOSVE-NEXT:    ret944  %res = call <4 x half> @llvm.nearbyint.v4f16(<4 x half> %op)945  ret <4 x half> %res946}947 948define <8 x half> @frinti_v8f16(<8 x half> %op) {949; CHECK-LABEL: frinti_v8f16:950; CHECK:       // %bb.0:951; CHECK-NEXT:    ptrue p0.h, vl8952; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0953; CHECK-NEXT:    frinti z0.h, p0/m, z0.h954; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0955; CHECK-NEXT:    ret956;957; NONEON-NOSVE-LABEL: frinti_v8f16:958; NONEON-NOSVE:       // %bb.0:959; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!960; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32961; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]962; NONEON-NOSVE-NEXT:    fcvt s0, h0963; NONEON-NOSVE-NEXT:    frinti s0, s0964; NONEON-NOSVE-NEXT:    fcvt h0, s0965; NONEON-NOSVE-NEXT:    str h0, [sp, #30]966; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]967; NONEON-NOSVE-NEXT:    fcvt s0, h0968; NONEON-NOSVE-NEXT:    frinti s0, s0969; NONEON-NOSVE-NEXT:    fcvt h0, s0970; NONEON-NOSVE-NEXT:    str h0, [sp, #28]971; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]972; NONEON-NOSVE-NEXT:    fcvt s0, h0973; NONEON-NOSVE-NEXT:    frinti s0, s0974; NONEON-NOSVE-NEXT:    fcvt h0, s0975; NONEON-NOSVE-NEXT:    str h0, [sp, #26]976; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]977; NONEON-NOSVE-NEXT:    fcvt s0, h0978; NONEON-NOSVE-NEXT:    frinti s0, s0979; NONEON-NOSVE-NEXT:    fcvt h0, s0980; NONEON-NOSVE-NEXT:    str h0, [sp, #24]981; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]982; NONEON-NOSVE-NEXT:    fcvt s0, h0983; NONEON-NOSVE-NEXT:    frinti s0, s0984; NONEON-NOSVE-NEXT:    fcvt h0, s0985; NONEON-NOSVE-NEXT:    str h0, [sp, #22]986; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]987; NONEON-NOSVE-NEXT:    fcvt s0, h0988; NONEON-NOSVE-NEXT:    frinti s0, s0989; NONEON-NOSVE-NEXT:    fcvt h0, s0990; NONEON-NOSVE-NEXT:    str h0, [sp, #20]991; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]992; NONEON-NOSVE-NEXT:    fcvt s0, h0993; NONEON-NOSVE-NEXT:    frinti s0, s0994; NONEON-NOSVE-NEXT:    fcvt h0, s0995; NONEON-NOSVE-NEXT:    str h0, [sp, #18]996; NONEON-NOSVE-NEXT:    ldr h0, [sp]997; NONEON-NOSVE-NEXT:    fcvt s0, h0998; NONEON-NOSVE-NEXT:    frinti s0, s0999; NONEON-NOSVE-NEXT:    fcvt h0, s01000; NONEON-NOSVE-NEXT:    str h0, [sp, #16]1001; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]1002; NONEON-NOSVE-NEXT:    add sp, sp, #321003; NONEON-NOSVE-NEXT:    ret1004  %res = call <8 x half> @llvm.nearbyint.v8f16(<8 x half> %op)1005  ret <8 x half> %res1006}1007 1008define void @frinti_v16f16(ptr %a) {1009; CHECK-LABEL: frinti_v16f16:1010; CHECK:       // %bb.0:1011; CHECK-NEXT:    ldp q0, q1, [x0]1012; CHECK-NEXT:    ptrue p0.h, vl81013; CHECK-NEXT:    frinti z0.h, p0/m, z0.h1014; CHECK-NEXT:    frinti z1.h, p0/m, z1.h1015; CHECK-NEXT:    stp q0, q1, [x0]1016; CHECK-NEXT:    ret1017;1018; NONEON-NOSVE-LABEL: frinti_v16f16:1019; NONEON-NOSVE:       // %bb.0:1020; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]1021; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!1022; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 641023; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]1024; NONEON-NOSVE-NEXT:    fcvt s0, h01025; NONEON-NOSVE-NEXT:    frinti s0, s01026; NONEON-NOSVE-NEXT:    fcvt h0, s01027; NONEON-NOSVE-NEXT:    str h0, [sp, #62]1028; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]1029; NONEON-NOSVE-NEXT:    fcvt s0, h01030; NONEON-NOSVE-NEXT:    frinti s0, s01031; NONEON-NOSVE-NEXT:    fcvt h0, s01032; NONEON-NOSVE-NEXT:    str h0, [sp, #60]1033; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]1034; NONEON-NOSVE-NEXT:    fcvt s0, h01035; NONEON-NOSVE-NEXT:    frinti s0, s01036; NONEON-NOSVE-NEXT:    fcvt h0, s01037; NONEON-NOSVE-NEXT:    str h0, [sp, #58]1038; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]1039; NONEON-NOSVE-NEXT:    fcvt s0, h01040; NONEON-NOSVE-NEXT:    frinti s0, s01041; NONEON-NOSVE-NEXT:    fcvt h0, s01042; NONEON-NOSVE-NEXT:    str h0, [sp, #56]1043; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]1044; NONEON-NOSVE-NEXT:    fcvt s0, h01045; NONEON-NOSVE-NEXT:    frinti s0, s01046; NONEON-NOSVE-NEXT:    fcvt h0, s01047; NONEON-NOSVE-NEXT:    str h0, [sp, #54]1048; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]1049; NONEON-NOSVE-NEXT:    fcvt s0, h01050; NONEON-NOSVE-NEXT:    frinti s0, s01051; NONEON-NOSVE-NEXT:    fcvt h0, s01052; NONEON-NOSVE-NEXT:    str h0, [sp, #52]1053; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]1054; NONEON-NOSVE-NEXT:    fcvt s0, h01055; NONEON-NOSVE-NEXT:    frinti s0, s01056; NONEON-NOSVE-NEXT:    fcvt h0, s01057; NONEON-NOSVE-NEXT:    str h0, [sp, #50]1058; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]1059; NONEON-NOSVE-NEXT:    fcvt s0, h01060; NONEON-NOSVE-NEXT:    frinti s0, s01061; NONEON-NOSVE-NEXT:    fcvt h0, s01062; NONEON-NOSVE-NEXT:    str h0, [sp, #48]1063; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]1064; NONEON-NOSVE-NEXT:    fcvt s0, h01065; NONEON-NOSVE-NEXT:    frinti s0, s01066; NONEON-NOSVE-NEXT:    fcvt h0, s01067; NONEON-NOSVE-NEXT:    str h0, [sp, #46]1068; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]1069; NONEON-NOSVE-NEXT:    fcvt s0, h01070; NONEON-NOSVE-NEXT:    frinti s0, s01071; NONEON-NOSVE-NEXT:    fcvt h0, s01072; NONEON-NOSVE-NEXT:    str h0, [sp, #44]1073; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]1074; NONEON-NOSVE-NEXT:    fcvt s0, h01075; NONEON-NOSVE-NEXT:    frinti s0, s01076; NONEON-NOSVE-NEXT:    fcvt h0, s01077; NONEON-NOSVE-NEXT:    str h0, [sp, #42]1078; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]1079; NONEON-NOSVE-NEXT:    fcvt s0, h01080; NONEON-NOSVE-NEXT:    frinti s0, s01081; NONEON-NOSVE-NEXT:    fcvt h0, s01082; NONEON-NOSVE-NEXT:    str h0, [sp, #40]1083; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1084; NONEON-NOSVE-NEXT:    fcvt s0, h01085; NONEON-NOSVE-NEXT:    frinti s0, s01086; NONEON-NOSVE-NEXT:    fcvt h0, s01087; NONEON-NOSVE-NEXT:    str h0, [sp, #38]1088; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1089; NONEON-NOSVE-NEXT:    fcvt s0, h01090; NONEON-NOSVE-NEXT:    frinti s0, s01091; NONEON-NOSVE-NEXT:    fcvt h0, s01092; NONEON-NOSVE-NEXT:    str h0, [sp, #36]1093; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1094; NONEON-NOSVE-NEXT:    fcvt s0, h01095; NONEON-NOSVE-NEXT:    frinti s0, s01096; NONEON-NOSVE-NEXT:    fcvt h0, s01097; NONEON-NOSVE-NEXT:    str h0, [sp, #34]1098; NONEON-NOSVE-NEXT:    ldr h0, [sp]1099; NONEON-NOSVE-NEXT:    fcvt s0, h01100; NONEON-NOSVE-NEXT:    frinti s0, s01101; NONEON-NOSVE-NEXT:    fcvt h0, s01102; NONEON-NOSVE-NEXT:    str h0, [sp, #32]1103; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]1104; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]1105; NONEON-NOSVE-NEXT:    add sp, sp, #641106; NONEON-NOSVE-NEXT:    ret1107  %op = load <16 x half>, ptr %a1108  %res = call <16 x half> @llvm.nearbyint.v16f16(<16 x half> %op)1109  store <16 x half> %res, ptr %a1110  ret void1111}1112 1113define <2 x float> @frinti_v2f32(<2 x float> %op) {1114; CHECK-LABEL: frinti_v2f32:1115; CHECK:       // %bb.0:1116; CHECK-NEXT:    ptrue p0.s, vl21117; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z01118; CHECK-NEXT:    frinti z0.s, p0/m, z0.s1119; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z01120; CHECK-NEXT:    ret1121;1122; NONEON-NOSVE-LABEL: frinti_v2f32:1123; NONEON-NOSVE:       // %bb.0:1124; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!1125; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161126; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]1127; NONEON-NOSVE-NEXT:    frinti s1, s01128; NONEON-NOSVE-NEXT:    ldr s0, [sp]1129; NONEON-NOSVE-NEXT:    frinti s0, s01130; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #8]1131; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1132; NONEON-NOSVE-NEXT:    add sp, sp, #161133; NONEON-NOSVE-NEXT:    ret1134  %res = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> %op)1135  ret <2 x float> %res1136}1137 1138define <4 x float> @frinti_v4f32(<4 x float> %op) {1139; CHECK-LABEL: frinti_v4f32:1140; CHECK:       // %bb.0:1141; CHECK-NEXT:    ptrue p0.s, vl41142; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z01143; CHECK-NEXT:    frinti z0.s, p0/m, z0.s1144; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z01145; CHECK-NEXT:    ret1146;1147; NONEON-NOSVE-LABEL: frinti_v4f32:1148; NONEON-NOSVE:       // %bb.0:1149; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!1150; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 321151; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]1152; NONEON-NOSVE-NEXT:    frinti s1, s01153; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]1154; NONEON-NOSVE-NEXT:    frinti s0, s01155; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #24]1156; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]1157; NONEON-NOSVE-NEXT:    frinti s1, s01158; NONEON-NOSVE-NEXT:    ldr s0, [sp]1159; NONEON-NOSVE-NEXT:    frinti s0, s01160; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #16]1161; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]1162; NONEON-NOSVE-NEXT:    add sp, sp, #321163; NONEON-NOSVE-NEXT:    ret1164  %res = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %op)1165  ret <4 x float> %res1166}1167 1168define void @frinti_v8f32(ptr %a) {1169; CHECK-LABEL: frinti_v8f32:1170; CHECK:       // %bb.0:1171; CHECK-NEXT:    ldp q0, q1, [x0]1172; CHECK-NEXT:    ptrue p0.s, vl41173; CHECK-NEXT:    frinti z0.s, p0/m, z0.s1174; CHECK-NEXT:    frinti z1.s, p0/m, z1.s1175; CHECK-NEXT:    stp q0, q1, [x0]1176; CHECK-NEXT:    ret1177;1178; NONEON-NOSVE-LABEL: frinti_v8f32:1179; NONEON-NOSVE:       // %bb.0:1180; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]1181; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!1182; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 641183; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]1184; NONEON-NOSVE-NEXT:    frinti s1, s01185; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]1186; NONEON-NOSVE-NEXT:    frinti s0, s01187; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #56]1188; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]1189; NONEON-NOSVE-NEXT:    frinti s1, s01190; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]1191; NONEON-NOSVE-NEXT:    frinti s0, s01192; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #48]1193; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]1194; NONEON-NOSVE-NEXT:    frinti s1, s01195; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]1196; NONEON-NOSVE-NEXT:    frinti s0, s01197; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #40]1198; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]1199; NONEON-NOSVE-NEXT:    frinti s1, s01200; NONEON-NOSVE-NEXT:    ldr s0, [sp]1201; NONEON-NOSVE-NEXT:    frinti s0, s01202; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #32]1203; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]1204; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]1205; NONEON-NOSVE-NEXT:    add sp, sp, #641206; NONEON-NOSVE-NEXT:    ret1207  %op = load <8 x float>, ptr %a1208  %res = call <8 x float> @llvm.nearbyint.v8f32(<8 x float> %op)1209  store <8 x float> %res, ptr %a1210  ret void1211}1212 1213define <1 x double> @frinti_v1f64(<1 x double> %op) {1214; CHECK-LABEL: frinti_v1f64:1215; CHECK:       // %bb.0:1216; CHECK-NEXT:    frinti d0, d01217; CHECK-NEXT:    ret1218;1219; NONEON-NOSVE-LABEL: frinti_v1f64:1220; NONEON-NOSVE:       // %bb.0:1221; NONEON-NOSVE-NEXT:    sub sp, sp, #161222; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161223; NONEON-NOSVE-NEXT:    frinti d0, d01224; NONEON-NOSVE-NEXT:    str d0, [sp, #8]1225; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1226; NONEON-NOSVE-NEXT:    add sp, sp, #161227; NONEON-NOSVE-NEXT:    ret1228  %res = call <1 x double> @llvm.nearbyint.v1f64(<1 x double> %op)1229  ret <1 x double> %res1230}1231 1232define <2 x double> @frinti_v2f64(<2 x double> %op) {1233; CHECK-LABEL: frinti_v2f64:1234; CHECK:       // %bb.0:1235; CHECK-NEXT:    ptrue p0.d, vl21236; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z01237; CHECK-NEXT:    frinti z0.d, p0/m, z0.d1238; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z01239; CHECK-NEXT:    ret1240;1241; NONEON-NOSVE-LABEL: frinti_v2f64:1242; NONEON-NOSVE:       // %bb.0:1243; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!1244; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 321245; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1246; NONEON-NOSVE-NEXT:    frinti d1, d01247; NONEON-NOSVE-NEXT:    ldr d0, [sp]1248; NONEON-NOSVE-NEXT:    frinti d0, d01249; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #16]1250; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]1251; NONEON-NOSVE-NEXT:    add sp, sp, #321252; NONEON-NOSVE-NEXT:    ret1253  %res = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %op)1254  ret <2 x double> %res1255}1256 1257define void @frinti_v4f64(ptr %a) {1258; CHECK-LABEL: frinti_v4f64:1259; CHECK:       // %bb.0:1260; CHECK-NEXT:    ldp q0, q1, [x0]1261; CHECK-NEXT:    ptrue p0.d, vl21262; CHECK-NEXT:    frinti z0.d, p0/m, z0.d1263; CHECK-NEXT:    frinti z1.d, p0/m, z1.d1264; CHECK-NEXT:    stp q0, q1, [x0]1265; CHECK-NEXT:    ret1266;1267; NONEON-NOSVE-LABEL: frinti_v4f64:1268; NONEON-NOSVE:       // %bb.0:1269; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]1270; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!1271; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 641272; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]1273; NONEON-NOSVE-NEXT:    frinti d1, d01274; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]1275; NONEON-NOSVE-NEXT:    frinti d0, d01276; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #48]1277; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1278; NONEON-NOSVE-NEXT:    frinti d1, d01279; NONEON-NOSVE-NEXT:    ldr d0, [sp]1280; NONEON-NOSVE-NEXT:    frinti d0, d01281; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #32]1282; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]1283; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]1284; NONEON-NOSVE-NEXT:    add sp, sp, #641285; NONEON-NOSVE-NEXT:    ret1286  %op = load <4 x double>, ptr %a1287  %res = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %op)1288  store <4 x double> %res, ptr %a1289  ret void1290}1291 1292;1293; RINT -> FRINTX1294;1295 1296define <2 x half> @frintx_v2f16(<2 x half> %op) {1297; CHECK-LABEL: frintx_v2f16:1298; CHECK:       // %bb.0:1299; CHECK-NEXT:    ptrue p0.h, vl41300; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z01301; CHECK-NEXT:    frintx z0.h, p0/m, z0.h1302; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z01303; CHECK-NEXT:    ret1304;1305; NONEON-NOSVE-LABEL: frintx_v2f16:1306; NONEON-NOSVE:       // %bb.0:1307; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!1308; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161309; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1310; NONEON-NOSVE-NEXT:    fcvt s0, h01311; NONEON-NOSVE-NEXT:    frintx s0, s01312; NONEON-NOSVE-NEXT:    fcvt h0, s01313; NONEON-NOSVE-NEXT:    str h0, [sp, #14]1314; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1315; NONEON-NOSVE-NEXT:    fcvt s0, h01316; NONEON-NOSVE-NEXT:    frintx s0, s01317; NONEON-NOSVE-NEXT:    fcvt h0, s01318; NONEON-NOSVE-NEXT:    str h0, [sp, #12]1319; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1320; NONEON-NOSVE-NEXT:    fcvt s0, h01321; NONEON-NOSVE-NEXT:    frintx s0, s01322; NONEON-NOSVE-NEXT:    fcvt h0, s01323; NONEON-NOSVE-NEXT:    str h0, [sp, #10]1324; NONEON-NOSVE-NEXT:    ldr h0, [sp]1325; NONEON-NOSVE-NEXT:    fcvt s0, h01326; NONEON-NOSVE-NEXT:    frintx s0, s01327; NONEON-NOSVE-NEXT:    fcvt h0, s01328; NONEON-NOSVE-NEXT:    str h0, [sp, #8]1329; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1330; NONEON-NOSVE-NEXT:    add sp, sp, #161331; NONEON-NOSVE-NEXT:    ret1332  %res = call <2 x half> @llvm.rint.v2f16(<2 x half> %op)1333  ret <2 x half> %res1334}1335 1336define <4 x half> @frintx_v4f16(<4 x half> %op) {1337; CHECK-LABEL: frintx_v4f16:1338; CHECK:       // %bb.0:1339; CHECK-NEXT:    ptrue p0.h, vl41340; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z01341; CHECK-NEXT:    frintx z0.h, p0/m, z0.h1342; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z01343; CHECK-NEXT:    ret1344;1345; NONEON-NOSVE-LABEL: frintx_v4f16:1346; NONEON-NOSVE:       // %bb.0:1347; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!1348; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161349; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1350; NONEON-NOSVE-NEXT:    fcvt s0, h01351; NONEON-NOSVE-NEXT:    frintx s0, s01352; NONEON-NOSVE-NEXT:    fcvt h0, s01353; NONEON-NOSVE-NEXT:    str h0, [sp, #14]1354; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1355; NONEON-NOSVE-NEXT:    fcvt s0, h01356; NONEON-NOSVE-NEXT:    frintx s0, s01357; NONEON-NOSVE-NEXT:    fcvt h0, s01358; NONEON-NOSVE-NEXT:    str h0, [sp, #12]1359; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1360; NONEON-NOSVE-NEXT:    fcvt s0, h01361; NONEON-NOSVE-NEXT:    frintx s0, s01362; NONEON-NOSVE-NEXT:    fcvt h0, s01363; NONEON-NOSVE-NEXT:    str h0, [sp, #10]1364; NONEON-NOSVE-NEXT:    ldr h0, [sp]1365; NONEON-NOSVE-NEXT:    fcvt s0, h01366; NONEON-NOSVE-NEXT:    frintx s0, s01367; NONEON-NOSVE-NEXT:    fcvt h0, s01368; NONEON-NOSVE-NEXT:    str h0, [sp, #8]1369; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1370; NONEON-NOSVE-NEXT:    add sp, sp, #161371; NONEON-NOSVE-NEXT:    ret1372  %res = call <4 x half> @llvm.rint.v4f16(<4 x half> %op)1373  ret <4 x half> %res1374}1375 1376define <8 x half> @frintx_v8f16(<8 x half> %op) {1377; CHECK-LABEL: frintx_v8f16:1378; CHECK:       // %bb.0:1379; CHECK-NEXT:    ptrue p0.h, vl81380; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z01381; CHECK-NEXT:    frintx z0.h, p0/m, z0.h1382; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z01383; CHECK-NEXT:    ret1384;1385; NONEON-NOSVE-LABEL: frintx_v8f16:1386; NONEON-NOSVE:       // %bb.0:1387; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!1388; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 321389; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]1390; NONEON-NOSVE-NEXT:    fcvt s0, h01391; NONEON-NOSVE-NEXT:    frintx s0, s01392; NONEON-NOSVE-NEXT:    fcvt h0, s01393; NONEON-NOSVE-NEXT:    str h0, [sp, #30]1394; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]1395; NONEON-NOSVE-NEXT:    fcvt s0, h01396; NONEON-NOSVE-NEXT:    frintx s0, s01397; NONEON-NOSVE-NEXT:    fcvt h0, s01398; NONEON-NOSVE-NEXT:    str h0, [sp, #28]1399; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]1400; NONEON-NOSVE-NEXT:    fcvt s0, h01401; NONEON-NOSVE-NEXT:    frintx s0, s01402; NONEON-NOSVE-NEXT:    fcvt h0, s01403; NONEON-NOSVE-NEXT:    str h0, [sp, #26]1404; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]1405; NONEON-NOSVE-NEXT:    fcvt s0, h01406; NONEON-NOSVE-NEXT:    frintx s0, s01407; NONEON-NOSVE-NEXT:    fcvt h0, s01408; NONEON-NOSVE-NEXT:    str h0, [sp, #24]1409; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1410; NONEON-NOSVE-NEXT:    fcvt s0, h01411; NONEON-NOSVE-NEXT:    frintx s0, s01412; NONEON-NOSVE-NEXT:    fcvt h0, s01413; NONEON-NOSVE-NEXT:    str h0, [sp, #22]1414; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1415; NONEON-NOSVE-NEXT:    fcvt s0, h01416; NONEON-NOSVE-NEXT:    frintx s0, s01417; NONEON-NOSVE-NEXT:    fcvt h0, s01418; NONEON-NOSVE-NEXT:    str h0, [sp, #20]1419; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1420; NONEON-NOSVE-NEXT:    fcvt s0, h01421; NONEON-NOSVE-NEXT:    frintx s0, s01422; NONEON-NOSVE-NEXT:    fcvt h0, s01423; NONEON-NOSVE-NEXT:    str h0, [sp, #18]1424; NONEON-NOSVE-NEXT:    ldr h0, [sp]1425; NONEON-NOSVE-NEXT:    fcvt s0, h01426; NONEON-NOSVE-NEXT:    frintx s0, s01427; NONEON-NOSVE-NEXT:    fcvt h0, s01428; NONEON-NOSVE-NEXT:    str h0, [sp, #16]1429; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]1430; NONEON-NOSVE-NEXT:    add sp, sp, #321431; NONEON-NOSVE-NEXT:    ret1432  %res = call <8 x half> @llvm.rint.v8f16(<8 x half> %op)1433  ret <8 x half> %res1434}1435 1436define void @frintx_v16f16(ptr %a) {1437; CHECK-LABEL: frintx_v16f16:1438; CHECK:       // %bb.0:1439; CHECK-NEXT:    ldp q0, q1, [x0]1440; CHECK-NEXT:    ptrue p0.h, vl81441; CHECK-NEXT:    frintx z0.h, p0/m, z0.h1442; CHECK-NEXT:    frintx z1.h, p0/m, z1.h1443; CHECK-NEXT:    stp q0, q1, [x0]1444; CHECK-NEXT:    ret1445;1446; NONEON-NOSVE-LABEL: frintx_v16f16:1447; NONEON-NOSVE:       // %bb.0:1448; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]1449; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!1450; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 641451; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]1452; NONEON-NOSVE-NEXT:    fcvt s0, h01453; NONEON-NOSVE-NEXT:    frintx s0, s01454; NONEON-NOSVE-NEXT:    fcvt h0, s01455; NONEON-NOSVE-NEXT:    str h0, [sp, #62]1456; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]1457; NONEON-NOSVE-NEXT:    fcvt s0, h01458; NONEON-NOSVE-NEXT:    frintx s0, s01459; NONEON-NOSVE-NEXT:    fcvt h0, s01460; NONEON-NOSVE-NEXT:    str h0, [sp, #60]1461; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]1462; NONEON-NOSVE-NEXT:    fcvt s0, h01463; NONEON-NOSVE-NEXT:    frintx s0, s01464; NONEON-NOSVE-NEXT:    fcvt h0, s01465; NONEON-NOSVE-NEXT:    str h0, [sp, #58]1466; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]1467; NONEON-NOSVE-NEXT:    fcvt s0, h01468; NONEON-NOSVE-NEXT:    frintx s0, s01469; NONEON-NOSVE-NEXT:    fcvt h0, s01470; NONEON-NOSVE-NEXT:    str h0, [sp, #56]1471; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]1472; NONEON-NOSVE-NEXT:    fcvt s0, h01473; NONEON-NOSVE-NEXT:    frintx s0, s01474; NONEON-NOSVE-NEXT:    fcvt h0, s01475; NONEON-NOSVE-NEXT:    str h0, [sp, #54]1476; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]1477; NONEON-NOSVE-NEXT:    fcvt s0, h01478; NONEON-NOSVE-NEXT:    frintx s0, s01479; NONEON-NOSVE-NEXT:    fcvt h0, s01480; NONEON-NOSVE-NEXT:    str h0, [sp, #52]1481; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]1482; NONEON-NOSVE-NEXT:    fcvt s0, h01483; NONEON-NOSVE-NEXT:    frintx s0, s01484; NONEON-NOSVE-NEXT:    fcvt h0, s01485; NONEON-NOSVE-NEXT:    str h0, [sp, #50]1486; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]1487; NONEON-NOSVE-NEXT:    fcvt s0, h01488; NONEON-NOSVE-NEXT:    frintx s0, s01489; NONEON-NOSVE-NEXT:    fcvt h0, s01490; NONEON-NOSVE-NEXT:    str h0, [sp, #48]1491; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]1492; NONEON-NOSVE-NEXT:    fcvt s0, h01493; NONEON-NOSVE-NEXT:    frintx s0, s01494; NONEON-NOSVE-NEXT:    fcvt h0, s01495; NONEON-NOSVE-NEXT:    str h0, [sp, #46]1496; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]1497; NONEON-NOSVE-NEXT:    fcvt s0, h01498; NONEON-NOSVE-NEXT:    frintx s0, s01499; NONEON-NOSVE-NEXT:    fcvt h0, s01500; NONEON-NOSVE-NEXT:    str h0, [sp, #44]1501; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]1502; NONEON-NOSVE-NEXT:    fcvt s0, h01503; NONEON-NOSVE-NEXT:    frintx s0, s01504; NONEON-NOSVE-NEXT:    fcvt h0, s01505; NONEON-NOSVE-NEXT:    str h0, [sp, #42]1506; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]1507; NONEON-NOSVE-NEXT:    fcvt s0, h01508; NONEON-NOSVE-NEXT:    frintx s0, s01509; NONEON-NOSVE-NEXT:    fcvt h0, s01510; NONEON-NOSVE-NEXT:    str h0, [sp, #40]1511; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1512; NONEON-NOSVE-NEXT:    fcvt s0, h01513; NONEON-NOSVE-NEXT:    frintx s0, s01514; NONEON-NOSVE-NEXT:    fcvt h0, s01515; NONEON-NOSVE-NEXT:    str h0, [sp, #38]1516; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1517; NONEON-NOSVE-NEXT:    fcvt s0, h01518; NONEON-NOSVE-NEXT:    frintx s0, s01519; NONEON-NOSVE-NEXT:    fcvt h0, s01520; NONEON-NOSVE-NEXT:    str h0, [sp, #36]1521; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1522; NONEON-NOSVE-NEXT:    fcvt s0, h01523; NONEON-NOSVE-NEXT:    frintx s0, s01524; NONEON-NOSVE-NEXT:    fcvt h0, s01525; NONEON-NOSVE-NEXT:    str h0, [sp, #34]1526; NONEON-NOSVE-NEXT:    ldr h0, [sp]1527; NONEON-NOSVE-NEXT:    fcvt s0, h01528; NONEON-NOSVE-NEXT:    frintx s0, s01529; NONEON-NOSVE-NEXT:    fcvt h0, s01530; NONEON-NOSVE-NEXT:    str h0, [sp, #32]1531; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]1532; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]1533; NONEON-NOSVE-NEXT:    add sp, sp, #641534; NONEON-NOSVE-NEXT:    ret1535  %op = load <16 x half>, ptr %a1536  %res = call <16 x half> @llvm.rint.v16f16(<16 x half> %op)1537  store <16 x half> %res, ptr %a1538  ret void1539}1540 1541define <2 x float> @frintx_v2f32(<2 x float> %op) {1542; CHECK-LABEL: frintx_v2f32:1543; CHECK:       // %bb.0:1544; CHECK-NEXT:    ptrue p0.s, vl21545; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z01546; CHECK-NEXT:    frintx z0.s, p0/m, z0.s1547; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z01548; CHECK-NEXT:    ret1549;1550; NONEON-NOSVE-LABEL: frintx_v2f32:1551; NONEON-NOSVE:       // %bb.0:1552; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!1553; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161554; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]1555; NONEON-NOSVE-NEXT:    frintx s1, s01556; NONEON-NOSVE-NEXT:    ldr s0, [sp]1557; NONEON-NOSVE-NEXT:    frintx s0, s01558; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #8]1559; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1560; NONEON-NOSVE-NEXT:    add sp, sp, #161561; NONEON-NOSVE-NEXT:    ret1562  %res = call <2 x float> @llvm.rint.v2f32(<2 x float> %op)1563  ret <2 x float> %res1564}1565 1566define <4 x float> @frintx_v4f32(<4 x float> %op) {1567; CHECK-LABEL: frintx_v4f32:1568; CHECK:       // %bb.0:1569; CHECK-NEXT:    ptrue p0.s, vl41570; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z01571; CHECK-NEXT:    frintx z0.s, p0/m, z0.s1572; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z01573; CHECK-NEXT:    ret1574;1575; NONEON-NOSVE-LABEL: frintx_v4f32:1576; NONEON-NOSVE:       // %bb.0:1577; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!1578; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 321579; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]1580; NONEON-NOSVE-NEXT:    frintx s1, s01581; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]1582; NONEON-NOSVE-NEXT:    frintx s0, s01583; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #24]1584; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]1585; NONEON-NOSVE-NEXT:    frintx s1, s01586; NONEON-NOSVE-NEXT:    ldr s0, [sp]1587; NONEON-NOSVE-NEXT:    frintx s0, s01588; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #16]1589; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]1590; NONEON-NOSVE-NEXT:    add sp, sp, #321591; NONEON-NOSVE-NEXT:    ret1592  %res = call <4 x float> @llvm.rint.v4f32(<4 x float> %op)1593  ret <4 x float> %res1594}1595 1596define void @frintx_v8f32(ptr %a) {1597; CHECK-LABEL: frintx_v8f32:1598; CHECK:       // %bb.0:1599; CHECK-NEXT:    ldp q0, q1, [x0]1600; CHECK-NEXT:    ptrue p0.s, vl41601; CHECK-NEXT:    frintx z0.s, p0/m, z0.s1602; CHECK-NEXT:    frintx z1.s, p0/m, z1.s1603; CHECK-NEXT:    stp q0, q1, [x0]1604; CHECK-NEXT:    ret1605;1606; NONEON-NOSVE-LABEL: frintx_v8f32:1607; NONEON-NOSVE:       // %bb.0:1608; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]1609; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!1610; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 641611; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]1612; NONEON-NOSVE-NEXT:    frintx s1, s01613; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]1614; NONEON-NOSVE-NEXT:    frintx s0, s01615; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #56]1616; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]1617; NONEON-NOSVE-NEXT:    frintx s1, s01618; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]1619; NONEON-NOSVE-NEXT:    frintx s0, s01620; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #48]1621; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]1622; NONEON-NOSVE-NEXT:    frintx s1, s01623; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]1624; NONEON-NOSVE-NEXT:    frintx s0, s01625; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #40]1626; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]1627; NONEON-NOSVE-NEXT:    frintx s1, s01628; NONEON-NOSVE-NEXT:    ldr s0, [sp]1629; NONEON-NOSVE-NEXT:    frintx s0, s01630; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #32]1631; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]1632; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]1633; NONEON-NOSVE-NEXT:    add sp, sp, #641634; NONEON-NOSVE-NEXT:    ret1635  %op = load <8 x float>, ptr %a1636  %res = call <8 x float> @llvm.rint.v8f32(<8 x float> %op)1637  store <8 x float> %res, ptr %a1638  ret void1639}1640 1641define <1 x double> @frintx_v1f64(<1 x double> %op) {1642; CHECK-LABEL: frintx_v1f64:1643; CHECK:       // %bb.0:1644; CHECK-NEXT:    frintx d0, d01645; CHECK-NEXT:    ret1646;1647; NONEON-NOSVE-LABEL: frintx_v1f64:1648; NONEON-NOSVE:       // %bb.0:1649; NONEON-NOSVE-NEXT:    sub sp, sp, #161650; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161651; NONEON-NOSVE-NEXT:    frintx d0, d01652; NONEON-NOSVE-NEXT:    str d0, [sp, #8]1653; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1654; NONEON-NOSVE-NEXT:    add sp, sp, #161655; NONEON-NOSVE-NEXT:    ret1656  %res = call <1 x double> @llvm.rint.v1f64(<1 x double> %op)1657  ret <1 x double> %res1658}1659 1660define <2 x double> @frintx_v2f64(<2 x double> %op) {1661; CHECK-LABEL: frintx_v2f64:1662; CHECK:       // %bb.0:1663; CHECK-NEXT:    ptrue p0.d, vl21664; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z01665; CHECK-NEXT:    frintx z0.d, p0/m, z0.d1666; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z01667; CHECK-NEXT:    ret1668;1669; NONEON-NOSVE-LABEL: frintx_v2f64:1670; NONEON-NOSVE:       // %bb.0:1671; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!1672; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 321673; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1674; NONEON-NOSVE-NEXT:    frintx d1, d01675; NONEON-NOSVE-NEXT:    ldr d0, [sp]1676; NONEON-NOSVE-NEXT:    frintx d0, d01677; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #16]1678; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]1679; NONEON-NOSVE-NEXT:    add sp, sp, #321680; NONEON-NOSVE-NEXT:    ret1681  %res = call <2 x double> @llvm.rint.v2f64(<2 x double> %op)1682  ret <2 x double> %res1683}1684 1685define void @frintx_v4f64(ptr %a) {1686; CHECK-LABEL: frintx_v4f64:1687; CHECK:       // %bb.0:1688; CHECK-NEXT:    ldp q0, q1, [x0]1689; CHECK-NEXT:    ptrue p0.d, vl21690; CHECK-NEXT:    frintx z0.d, p0/m, z0.d1691; CHECK-NEXT:    frintx z1.d, p0/m, z1.d1692; CHECK-NEXT:    stp q0, q1, [x0]1693; CHECK-NEXT:    ret1694;1695; NONEON-NOSVE-LABEL: frintx_v4f64:1696; NONEON-NOSVE:       // %bb.0:1697; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]1698; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!1699; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 641700; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]1701; NONEON-NOSVE-NEXT:    frintx d1, d01702; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]1703; NONEON-NOSVE-NEXT:    frintx d0, d01704; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #48]1705; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1706; NONEON-NOSVE-NEXT:    frintx d1, d01707; NONEON-NOSVE-NEXT:    ldr d0, [sp]1708; NONEON-NOSVE-NEXT:    frintx d0, d01709; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #32]1710; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]1711; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]1712; NONEON-NOSVE-NEXT:    add sp, sp, #641713; NONEON-NOSVE-NEXT:    ret1714  %op = load <4 x double>, ptr %a1715  %res = call <4 x double> @llvm.rint.v4f64(<4 x double> %op)1716  store <4 x double> %res, ptr %a1717  ret void1718}1719 1720;1721; ROUND -> FRINTA1722;1723 1724define <2 x half> @frinta_v2f16(<2 x half> %op) {1725; CHECK-LABEL: frinta_v2f16:1726; CHECK:       // %bb.0:1727; CHECK-NEXT:    ptrue p0.h, vl41728; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z01729; CHECK-NEXT:    frinta z0.h, p0/m, z0.h1730; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z01731; CHECK-NEXT:    ret1732;1733; NONEON-NOSVE-LABEL: frinta_v2f16:1734; NONEON-NOSVE:       // %bb.0:1735; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!1736; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161737; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1738; NONEON-NOSVE-NEXT:    fcvt s0, h01739; NONEON-NOSVE-NEXT:    frinta s0, s01740; NONEON-NOSVE-NEXT:    fcvt h0, s01741; NONEON-NOSVE-NEXT:    str h0, [sp, #14]1742; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1743; NONEON-NOSVE-NEXT:    fcvt s0, h01744; NONEON-NOSVE-NEXT:    frinta s0, s01745; NONEON-NOSVE-NEXT:    fcvt h0, s01746; NONEON-NOSVE-NEXT:    str h0, [sp, #12]1747; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1748; NONEON-NOSVE-NEXT:    fcvt s0, h01749; NONEON-NOSVE-NEXT:    frinta s0, s01750; NONEON-NOSVE-NEXT:    fcvt h0, s01751; NONEON-NOSVE-NEXT:    str h0, [sp, #10]1752; NONEON-NOSVE-NEXT:    ldr h0, [sp]1753; NONEON-NOSVE-NEXT:    fcvt s0, h01754; NONEON-NOSVE-NEXT:    frinta s0, s01755; NONEON-NOSVE-NEXT:    fcvt h0, s01756; NONEON-NOSVE-NEXT:    str h0, [sp, #8]1757; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1758; NONEON-NOSVE-NEXT:    add sp, sp, #161759; NONEON-NOSVE-NEXT:    ret1760  %res = call <2 x half> @llvm.round.v2f16(<2 x half> %op)1761  ret <2 x half> %res1762}1763 1764define <4 x half> @frinta_v4f16(<4 x half> %op) {1765; CHECK-LABEL: frinta_v4f16:1766; CHECK:       // %bb.0:1767; CHECK-NEXT:    ptrue p0.h, vl41768; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z01769; CHECK-NEXT:    frinta z0.h, p0/m, z0.h1770; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z01771; CHECK-NEXT:    ret1772;1773; NONEON-NOSVE-LABEL: frinta_v4f16:1774; NONEON-NOSVE:       // %bb.0:1775; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!1776; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161777; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1778; NONEON-NOSVE-NEXT:    fcvt s0, h01779; NONEON-NOSVE-NEXT:    frinta s0, s01780; NONEON-NOSVE-NEXT:    fcvt h0, s01781; NONEON-NOSVE-NEXT:    str h0, [sp, #14]1782; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1783; NONEON-NOSVE-NEXT:    fcvt s0, h01784; NONEON-NOSVE-NEXT:    frinta s0, s01785; NONEON-NOSVE-NEXT:    fcvt h0, s01786; NONEON-NOSVE-NEXT:    str h0, [sp, #12]1787; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1788; NONEON-NOSVE-NEXT:    fcvt s0, h01789; NONEON-NOSVE-NEXT:    frinta s0, s01790; NONEON-NOSVE-NEXT:    fcvt h0, s01791; NONEON-NOSVE-NEXT:    str h0, [sp, #10]1792; NONEON-NOSVE-NEXT:    ldr h0, [sp]1793; NONEON-NOSVE-NEXT:    fcvt s0, h01794; NONEON-NOSVE-NEXT:    frinta s0, s01795; NONEON-NOSVE-NEXT:    fcvt h0, s01796; NONEON-NOSVE-NEXT:    str h0, [sp, #8]1797; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1798; NONEON-NOSVE-NEXT:    add sp, sp, #161799; NONEON-NOSVE-NEXT:    ret1800  %res = call <4 x half> @llvm.round.v4f16(<4 x half> %op)1801  ret <4 x half> %res1802}1803 1804define <8 x half> @frinta_v8f16(<8 x half> %op) {1805; CHECK-LABEL: frinta_v8f16:1806; CHECK:       // %bb.0:1807; CHECK-NEXT:    ptrue p0.h, vl81808; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z01809; CHECK-NEXT:    frinta z0.h, p0/m, z0.h1810; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z01811; CHECK-NEXT:    ret1812;1813; NONEON-NOSVE-LABEL: frinta_v8f16:1814; NONEON-NOSVE:       // %bb.0:1815; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!1816; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 321817; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]1818; NONEON-NOSVE-NEXT:    fcvt s0, h01819; NONEON-NOSVE-NEXT:    frinta s0, s01820; NONEON-NOSVE-NEXT:    fcvt h0, s01821; NONEON-NOSVE-NEXT:    str h0, [sp, #30]1822; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]1823; NONEON-NOSVE-NEXT:    fcvt s0, h01824; NONEON-NOSVE-NEXT:    frinta s0, s01825; NONEON-NOSVE-NEXT:    fcvt h0, s01826; NONEON-NOSVE-NEXT:    str h0, [sp, #28]1827; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]1828; NONEON-NOSVE-NEXT:    fcvt s0, h01829; NONEON-NOSVE-NEXT:    frinta s0, s01830; NONEON-NOSVE-NEXT:    fcvt h0, s01831; NONEON-NOSVE-NEXT:    str h0, [sp, #26]1832; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]1833; NONEON-NOSVE-NEXT:    fcvt s0, h01834; NONEON-NOSVE-NEXT:    frinta s0, s01835; NONEON-NOSVE-NEXT:    fcvt h0, s01836; NONEON-NOSVE-NEXT:    str h0, [sp, #24]1837; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1838; NONEON-NOSVE-NEXT:    fcvt s0, h01839; NONEON-NOSVE-NEXT:    frinta s0, s01840; NONEON-NOSVE-NEXT:    fcvt h0, s01841; NONEON-NOSVE-NEXT:    str h0, [sp, #22]1842; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1843; NONEON-NOSVE-NEXT:    fcvt s0, h01844; NONEON-NOSVE-NEXT:    frinta s0, s01845; NONEON-NOSVE-NEXT:    fcvt h0, s01846; NONEON-NOSVE-NEXT:    str h0, [sp, #20]1847; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1848; NONEON-NOSVE-NEXT:    fcvt s0, h01849; NONEON-NOSVE-NEXT:    frinta s0, s01850; NONEON-NOSVE-NEXT:    fcvt h0, s01851; NONEON-NOSVE-NEXT:    str h0, [sp, #18]1852; NONEON-NOSVE-NEXT:    ldr h0, [sp]1853; NONEON-NOSVE-NEXT:    fcvt s0, h01854; NONEON-NOSVE-NEXT:    frinta s0, s01855; NONEON-NOSVE-NEXT:    fcvt h0, s01856; NONEON-NOSVE-NEXT:    str h0, [sp, #16]1857; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]1858; NONEON-NOSVE-NEXT:    add sp, sp, #321859; NONEON-NOSVE-NEXT:    ret1860  %res = call <8 x half> @llvm.round.v8f16(<8 x half> %op)1861  ret <8 x half> %res1862}1863 1864define void @frinta_v16f16(ptr %a) {1865; CHECK-LABEL: frinta_v16f16:1866; CHECK:       // %bb.0:1867; CHECK-NEXT:    ldp q0, q1, [x0]1868; CHECK-NEXT:    ptrue p0.h, vl81869; CHECK-NEXT:    frinta z0.h, p0/m, z0.h1870; CHECK-NEXT:    frinta z1.h, p0/m, z1.h1871; CHECK-NEXT:    stp q0, q1, [x0]1872; CHECK-NEXT:    ret1873;1874; NONEON-NOSVE-LABEL: frinta_v16f16:1875; NONEON-NOSVE:       // %bb.0:1876; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]1877; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!1878; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 641879; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]1880; NONEON-NOSVE-NEXT:    fcvt s0, h01881; NONEON-NOSVE-NEXT:    frinta s0, s01882; NONEON-NOSVE-NEXT:    fcvt h0, s01883; NONEON-NOSVE-NEXT:    str h0, [sp, #62]1884; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]1885; NONEON-NOSVE-NEXT:    fcvt s0, h01886; NONEON-NOSVE-NEXT:    frinta s0, s01887; NONEON-NOSVE-NEXT:    fcvt h0, s01888; NONEON-NOSVE-NEXT:    str h0, [sp, #60]1889; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]1890; NONEON-NOSVE-NEXT:    fcvt s0, h01891; NONEON-NOSVE-NEXT:    frinta s0, s01892; NONEON-NOSVE-NEXT:    fcvt h0, s01893; NONEON-NOSVE-NEXT:    str h0, [sp, #58]1894; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]1895; NONEON-NOSVE-NEXT:    fcvt s0, h01896; NONEON-NOSVE-NEXT:    frinta s0, s01897; NONEON-NOSVE-NEXT:    fcvt h0, s01898; NONEON-NOSVE-NEXT:    str h0, [sp, #56]1899; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]1900; NONEON-NOSVE-NEXT:    fcvt s0, h01901; NONEON-NOSVE-NEXT:    frinta s0, s01902; NONEON-NOSVE-NEXT:    fcvt h0, s01903; NONEON-NOSVE-NEXT:    str h0, [sp, #54]1904; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]1905; NONEON-NOSVE-NEXT:    fcvt s0, h01906; NONEON-NOSVE-NEXT:    frinta s0, s01907; NONEON-NOSVE-NEXT:    fcvt h0, s01908; NONEON-NOSVE-NEXT:    str h0, [sp, #52]1909; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]1910; NONEON-NOSVE-NEXT:    fcvt s0, h01911; NONEON-NOSVE-NEXT:    frinta s0, s01912; NONEON-NOSVE-NEXT:    fcvt h0, s01913; NONEON-NOSVE-NEXT:    str h0, [sp, #50]1914; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]1915; NONEON-NOSVE-NEXT:    fcvt s0, h01916; NONEON-NOSVE-NEXT:    frinta s0, s01917; NONEON-NOSVE-NEXT:    fcvt h0, s01918; NONEON-NOSVE-NEXT:    str h0, [sp, #48]1919; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]1920; NONEON-NOSVE-NEXT:    fcvt s0, h01921; NONEON-NOSVE-NEXT:    frinta s0, s01922; NONEON-NOSVE-NEXT:    fcvt h0, s01923; NONEON-NOSVE-NEXT:    str h0, [sp, #46]1924; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]1925; NONEON-NOSVE-NEXT:    fcvt s0, h01926; NONEON-NOSVE-NEXT:    frinta s0, s01927; NONEON-NOSVE-NEXT:    fcvt h0, s01928; NONEON-NOSVE-NEXT:    str h0, [sp, #44]1929; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]1930; NONEON-NOSVE-NEXT:    fcvt s0, h01931; NONEON-NOSVE-NEXT:    frinta s0, s01932; NONEON-NOSVE-NEXT:    fcvt h0, s01933; NONEON-NOSVE-NEXT:    str h0, [sp, #42]1934; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]1935; NONEON-NOSVE-NEXT:    fcvt s0, h01936; NONEON-NOSVE-NEXT:    frinta s0, s01937; NONEON-NOSVE-NEXT:    fcvt h0, s01938; NONEON-NOSVE-NEXT:    str h0, [sp, #40]1939; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]1940; NONEON-NOSVE-NEXT:    fcvt s0, h01941; NONEON-NOSVE-NEXT:    frinta s0, s01942; NONEON-NOSVE-NEXT:    fcvt h0, s01943; NONEON-NOSVE-NEXT:    str h0, [sp, #38]1944; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]1945; NONEON-NOSVE-NEXT:    fcvt s0, h01946; NONEON-NOSVE-NEXT:    frinta s0, s01947; NONEON-NOSVE-NEXT:    fcvt h0, s01948; NONEON-NOSVE-NEXT:    str h0, [sp, #36]1949; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]1950; NONEON-NOSVE-NEXT:    fcvt s0, h01951; NONEON-NOSVE-NEXT:    frinta s0, s01952; NONEON-NOSVE-NEXT:    fcvt h0, s01953; NONEON-NOSVE-NEXT:    str h0, [sp, #34]1954; NONEON-NOSVE-NEXT:    ldr h0, [sp]1955; NONEON-NOSVE-NEXT:    fcvt s0, h01956; NONEON-NOSVE-NEXT:    frinta s0, s01957; NONEON-NOSVE-NEXT:    fcvt h0, s01958; NONEON-NOSVE-NEXT:    str h0, [sp, #32]1959; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]1960; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]1961; NONEON-NOSVE-NEXT:    add sp, sp, #641962; NONEON-NOSVE-NEXT:    ret1963  %op = load <16 x half>, ptr %a1964  %res = call <16 x half> @llvm.round.v16f16(<16 x half> %op)1965  store <16 x half> %res, ptr %a1966  ret void1967}1968 1969define <2 x float> @frinta_v2f32(<2 x float> %op) {1970; CHECK-LABEL: frinta_v2f32:1971; CHECK:       // %bb.0:1972; CHECK-NEXT:    ptrue p0.s, vl21973; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z01974; CHECK-NEXT:    frinta z0.s, p0/m, z0.s1975; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z01976; CHECK-NEXT:    ret1977;1978; NONEON-NOSVE-LABEL: frinta_v2f32:1979; NONEON-NOSVE:       // %bb.0:1980; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!1981; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 161982; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]1983; NONEON-NOSVE-NEXT:    frinta s1, s01984; NONEON-NOSVE-NEXT:    ldr s0, [sp]1985; NONEON-NOSVE-NEXT:    frinta s0, s01986; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #8]1987; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]1988; NONEON-NOSVE-NEXT:    add sp, sp, #161989; NONEON-NOSVE-NEXT:    ret1990  %res = call <2 x float> @llvm.round.v2f32(<2 x float> %op)1991  ret <2 x float> %res1992}1993 1994define <4 x float> @frinta_v4f32(<4 x float> %op) {1995; CHECK-LABEL: frinta_v4f32:1996; CHECK:       // %bb.0:1997; CHECK-NEXT:    ptrue p0.s, vl41998; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z01999; CHECK-NEXT:    frinta z0.s, p0/m, z0.s2000; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02001; CHECK-NEXT:    ret2002;2003; NONEON-NOSVE-LABEL: frinta_v4f32:2004; NONEON-NOSVE:       // %bb.0:2005; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2006; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322007; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]2008; NONEON-NOSVE-NEXT:    frinta s1, s02009; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]2010; NONEON-NOSVE-NEXT:    frinta s0, s02011; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #24]2012; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2013; NONEON-NOSVE-NEXT:    frinta s1, s02014; NONEON-NOSVE-NEXT:    ldr s0, [sp]2015; NONEON-NOSVE-NEXT:    frinta s0, s02016; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #16]2017; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2018; NONEON-NOSVE-NEXT:    add sp, sp, #322019; NONEON-NOSVE-NEXT:    ret2020  %res = call <4 x float> @llvm.round.v4f32(<4 x float> %op)2021  ret <4 x float> %res2022}2023 2024define void @frinta_v8f32(ptr %a) {2025; CHECK-LABEL: frinta_v8f32:2026; CHECK:       // %bb.0:2027; CHECK-NEXT:    ldp q0, q1, [x0]2028; CHECK-NEXT:    ptrue p0.s, vl42029; CHECK-NEXT:    frinta z0.s, p0/m, z0.s2030; CHECK-NEXT:    frinta z1.s, p0/m, z1.s2031; CHECK-NEXT:    stp q0, q1, [x0]2032; CHECK-NEXT:    ret2033;2034; NONEON-NOSVE-LABEL: frinta_v8f32:2035; NONEON-NOSVE:       // %bb.0:2036; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2037; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2038; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642039; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]2040; NONEON-NOSVE-NEXT:    frinta s1, s02041; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]2042; NONEON-NOSVE-NEXT:    frinta s0, s02043; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #56]2044; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]2045; NONEON-NOSVE-NEXT:    frinta s1, s02046; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]2047; NONEON-NOSVE-NEXT:    frinta s0, s02048; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #48]2049; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]2050; NONEON-NOSVE-NEXT:    frinta s1, s02051; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]2052; NONEON-NOSVE-NEXT:    frinta s0, s02053; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #40]2054; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2055; NONEON-NOSVE-NEXT:    frinta s1, s02056; NONEON-NOSVE-NEXT:    ldr s0, [sp]2057; NONEON-NOSVE-NEXT:    frinta s0, s02058; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #32]2059; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2060; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2061; NONEON-NOSVE-NEXT:    add sp, sp, #642062; NONEON-NOSVE-NEXT:    ret2063  %op = load <8 x float>, ptr %a2064  %res = call <8 x float> @llvm.round.v8f32(<8 x float> %op)2065  store <8 x float> %res, ptr %a2066  ret void2067}2068 2069define <1 x double> @frinta_v1f64(<1 x double> %op) {2070; CHECK-LABEL: frinta_v1f64:2071; CHECK:       // %bb.0:2072; CHECK-NEXT:    frinta d0, d02073; CHECK-NEXT:    ret2074;2075; NONEON-NOSVE-LABEL: frinta_v1f64:2076; NONEON-NOSVE:       // %bb.0:2077; NONEON-NOSVE-NEXT:    sub sp, sp, #162078; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162079; NONEON-NOSVE-NEXT:    frinta d0, d02080; NONEON-NOSVE-NEXT:    str d0, [sp, #8]2081; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2082; NONEON-NOSVE-NEXT:    add sp, sp, #162083; NONEON-NOSVE-NEXT:    ret2084  %res = call <1 x double> @llvm.round.v1f64(<1 x double> %op)2085  ret <1 x double> %res2086}2087 2088define <2 x double> @frinta_v2f64(<2 x double> %op) {2089; CHECK-LABEL: frinta_v2f64:2090; CHECK:       // %bb.0:2091; CHECK-NEXT:    ptrue p0.d, vl22092; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z02093; CHECK-NEXT:    frinta z0.d, p0/m, z0.d2094; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02095; CHECK-NEXT:    ret2096;2097; NONEON-NOSVE-LABEL: frinta_v2f64:2098; NONEON-NOSVE:       // %bb.0:2099; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2100; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322101; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2102; NONEON-NOSVE-NEXT:    frinta d1, d02103; NONEON-NOSVE-NEXT:    ldr d0, [sp]2104; NONEON-NOSVE-NEXT:    frinta d0, d02105; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #16]2106; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2107; NONEON-NOSVE-NEXT:    add sp, sp, #322108; NONEON-NOSVE-NEXT:    ret2109  %res = call <2 x double> @llvm.round.v2f64(<2 x double> %op)2110  ret <2 x double> %res2111}2112 2113define void @frinta_v4f64(ptr %a) {2114; CHECK-LABEL: frinta_v4f64:2115; CHECK:       // %bb.0:2116; CHECK-NEXT:    ldp q0, q1, [x0]2117; CHECK-NEXT:    ptrue p0.d, vl22118; CHECK-NEXT:    frinta z0.d, p0/m, z0.d2119; CHECK-NEXT:    frinta z1.d, p0/m, z1.d2120; CHECK-NEXT:    stp q0, q1, [x0]2121; CHECK-NEXT:    ret2122;2123; NONEON-NOSVE-LABEL: frinta_v4f64:2124; NONEON-NOSVE:       // %bb.0:2125; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2126; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2127; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642128; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]2129; NONEON-NOSVE-NEXT:    frinta d1, d02130; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]2131; NONEON-NOSVE-NEXT:    frinta d0, d02132; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #48]2133; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2134; NONEON-NOSVE-NEXT:    frinta d1, d02135; NONEON-NOSVE-NEXT:    ldr d0, [sp]2136; NONEON-NOSVE-NEXT:    frinta d0, d02137; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #32]2138; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2139; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2140; NONEON-NOSVE-NEXT:    add sp, sp, #642141; NONEON-NOSVE-NEXT:    ret2142  %op = load <4 x double>, ptr %a2143  %res = call <4 x double> @llvm.round.v4f64(<4 x double> %op)2144  store <4 x double> %res, ptr %a2145  ret void2146}2147 2148;2149; ROUNDEVEN -> FRINTN2150;2151 2152define <2 x half> @frintn_v2f16(<2 x half> %op) {2153; CHECK-LABEL: frintn_v2f16:2154; CHECK:       // %bb.0:2155; CHECK-NEXT:    ptrue p0.h, vl42156; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z02157; CHECK-NEXT:    frintn z0.h, p0/m, z0.h2158; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z02159; CHECK-NEXT:    ret2160;2161; NONEON-NOSVE-LABEL: frintn_v2f16:2162; NONEON-NOSVE:       // %bb.0:2163; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!2164; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162165; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2166; NONEON-NOSVE-NEXT:    fcvt s0, h02167; NONEON-NOSVE-NEXT:    frintn s0, s02168; NONEON-NOSVE-NEXT:    fcvt h0, s02169; NONEON-NOSVE-NEXT:    str h0, [sp, #14]2170; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2171; NONEON-NOSVE-NEXT:    fcvt s0, h02172; NONEON-NOSVE-NEXT:    frintn s0, s02173; NONEON-NOSVE-NEXT:    fcvt h0, s02174; NONEON-NOSVE-NEXT:    str h0, [sp, #12]2175; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2176; NONEON-NOSVE-NEXT:    fcvt s0, h02177; NONEON-NOSVE-NEXT:    frintn s0, s02178; NONEON-NOSVE-NEXT:    fcvt h0, s02179; NONEON-NOSVE-NEXT:    str h0, [sp, #10]2180; NONEON-NOSVE-NEXT:    ldr h0, [sp]2181; NONEON-NOSVE-NEXT:    fcvt s0, h02182; NONEON-NOSVE-NEXT:    frintn s0, s02183; NONEON-NOSVE-NEXT:    fcvt h0, s02184; NONEON-NOSVE-NEXT:    str h0, [sp, #8]2185; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2186; NONEON-NOSVE-NEXT:    add sp, sp, #162187; NONEON-NOSVE-NEXT:    ret2188  %res = call <2 x half> @llvm.roundeven.v2f16(<2 x half> %op)2189  ret <2 x half> %res2190}2191 2192define <4 x half> @frintn_v4f16(<4 x half> %op) {2193; CHECK-LABEL: frintn_v4f16:2194; CHECK:       // %bb.0:2195; CHECK-NEXT:    ptrue p0.h, vl42196; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z02197; CHECK-NEXT:    frintn z0.h, p0/m, z0.h2198; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z02199; CHECK-NEXT:    ret2200;2201; NONEON-NOSVE-LABEL: frintn_v4f16:2202; NONEON-NOSVE:       // %bb.0:2203; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!2204; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162205; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2206; NONEON-NOSVE-NEXT:    fcvt s0, h02207; NONEON-NOSVE-NEXT:    frintn s0, s02208; NONEON-NOSVE-NEXT:    fcvt h0, s02209; NONEON-NOSVE-NEXT:    str h0, [sp, #14]2210; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2211; NONEON-NOSVE-NEXT:    fcvt s0, h02212; NONEON-NOSVE-NEXT:    frintn s0, s02213; NONEON-NOSVE-NEXT:    fcvt h0, s02214; NONEON-NOSVE-NEXT:    str h0, [sp, #12]2215; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2216; NONEON-NOSVE-NEXT:    fcvt s0, h02217; NONEON-NOSVE-NEXT:    frintn s0, s02218; NONEON-NOSVE-NEXT:    fcvt h0, s02219; NONEON-NOSVE-NEXT:    str h0, [sp, #10]2220; NONEON-NOSVE-NEXT:    ldr h0, [sp]2221; NONEON-NOSVE-NEXT:    fcvt s0, h02222; NONEON-NOSVE-NEXT:    frintn s0, s02223; NONEON-NOSVE-NEXT:    fcvt h0, s02224; NONEON-NOSVE-NEXT:    str h0, [sp, #8]2225; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2226; NONEON-NOSVE-NEXT:    add sp, sp, #162227; NONEON-NOSVE-NEXT:    ret2228  %res = call <4 x half> @llvm.roundeven.v4f16(<4 x half> %op)2229  ret <4 x half> %res2230}2231 2232define <8 x half> @frintn_v8f16(<8 x half> %op) {2233; CHECK-LABEL: frintn_v8f16:2234; CHECK:       // %bb.0:2235; CHECK-NEXT:    ptrue p0.h, vl82236; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z02237; CHECK-NEXT:    frintn z0.h, p0/m, z0.h2238; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02239; CHECK-NEXT:    ret2240;2241; NONEON-NOSVE-LABEL: frintn_v8f16:2242; NONEON-NOSVE:       // %bb.0:2243; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2244; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322245; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]2246; NONEON-NOSVE-NEXT:    fcvt s0, h02247; NONEON-NOSVE-NEXT:    frintn s0, s02248; NONEON-NOSVE-NEXT:    fcvt h0, s02249; NONEON-NOSVE-NEXT:    str h0, [sp, #30]2250; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]2251; NONEON-NOSVE-NEXT:    fcvt s0, h02252; NONEON-NOSVE-NEXT:    frintn s0, s02253; NONEON-NOSVE-NEXT:    fcvt h0, s02254; NONEON-NOSVE-NEXT:    str h0, [sp, #28]2255; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]2256; NONEON-NOSVE-NEXT:    fcvt s0, h02257; NONEON-NOSVE-NEXT:    frintn s0, s02258; NONEON-NOSVE-NEXT:    fcvt h0, s02259; NONEON-NOSVE-NEXT:    str h0, [sp, #26]2260; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]2261; NONEON-NOSVE-NEXT:    fcvt s0, h02262; NONEON-NOSVE-NEXT:    frintn s0, s02263; NONEON-NOSVE-NEXT:    fcvt h0, s02264; NONEON-NOSVE-NEXT:    str h0, [sp, #24]2265; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2266; NONEON-NOSVE-NEXT:    fcvt s0, h02267; NONEON-NOSVE-NEXT:    frintn s0, s02268; NONEON-NOSVE-NEXT:    fcvt h0, s02269; NONEON-NOSVE-NEXT:    str h0, [sp, #22]2270; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2271; NONEON-NOSVE-NEXT:    fcvt s0, h02272; NONEON-NOSVE-NEXT:    frintn s0, s02273; NONEON-NOSVE-NEXT:    fcvt h0, s02274; NONEON-NOSVE-NEXT:    str h0, [sp, #20]2275; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2276; NONEON-NOSVE-NEXT:    fcvt s0, h02277; NONEON-NOSVE-NEXT:    frintn s0, s02278; NONEON-NOSVE-NEXT:    fcvt h0, s02279; NONEON-NOSVE-NEXT:    str h0, [sp, #18]2280; NONEON-NOSVE-NEXT:    ldr h0, [sp]2281; NONEON-NOSVE-NEXT:    fcvt s0, h02282; NONEON-NOSVE-NEXT:    frintn s0, s02283; NONEON-NOSVE-NEXT:    fcvt h0, s02284; NONEON-NOSVE-NEXT:    str h0, [sp, #16]2285; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2286; NONEON-NOSVE-NEXT:    add sp, sp, #322287; NONEON-NOSVE-NEXT:    ret2288  %res = call <8 x half> @llvm.roundeven.v8f16(<8 x half> %op)2289  ret <8 x half> %res2290}2291 2292define void @frintn_v16f16(ptr %a) {2293; CHECK-LABEL: frintn_v16f16:2294; CHECK:       // %bb.0:2295; CHECK-NEXT:    ldp q0, q1, [x0]2296; CHECK-NEXT:    ptrue p0.h, vl82297; CHECK-NEXT:    frintn z0.h, p0/m, z0.h2298; CHECK-NEXT:    frintn z1.h, p0/m, z1.h2299; CHECK-NEXT:    stp q0, q1, [x0]2300; CHECK-NEXT:    ret2301;2302; NONEON-NOSVE-LABEL: frintn_v16f16:2303; NONEON-NOSVE:       // %bb.0:2304; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2305; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2306; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642307; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]2308; NONEON-NOSVE-NEXT:    fcvt s0, h02309; NONEON-NOSVE-NEXT:    frintn s0, s02310; NONEON-NOSVE-NEXT:    fcvt h0, s02311; NONEON-NOSVE-NEXT:    str h0, [sp, #62]2312; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]2313; NONEON-NOSVE-NEXT:    fcvt s0, h02314; NONEON-NOSVE-NEXT:    frintn s0, s02315; NONEON-NOSVE-NEXT:    fcvt h0, s02316; NONEON-NOSVE-NEXT:    str h0, [sp, #60]2317; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]2318; NONEON-NOSVE-NEXT:    fcvt s0, h02319; NONEON-NOSVE-NEXT:    frintn s0, s02320; NONEON-NOSVE-NEXT:    fcvt h0, s02321; NONEON-NOSVE-NEXT:    str h0, [sp, #58]2322; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]2323; NONEON-NOSVE-NEXT:    fcvt s0, h02324; NONEON-NOSVE-NEXT:    frintn s0, s02325; NONEON-NOSVE-NEXT:    fcvt h0, s02326; NONEON-NOSVE-NEXT:    str h0, [sp, #56]2327; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]2328; NONEON-NOSVE-NEXT:    fcvt s0, h02329; NONEON-NOSVE-NEXT:    frintn s0, s02330; NONEON-NOSVE-NEXT:    fcvt h0, s02331; NONEON-NOSVE-NEXT:    str h0, [sp, #54]2332; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]2333; NONEON-NOSVE-NEXT:    fcvt s0, h02334; NONEON-NOSVE-NEXT:    frintn s0, s02335; NONEON-NOSVE-NEXT:    fcvt h0, s02336; NONEON-NOSVE-NEXT:    str h0, [sp, #52]2337; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]2338; NONEON-NOSVE-NEXT:    fcvt s0, h02339; NONEON-NOSVE-NEXT:    frintn s0, s02340; NONEON-NOSVE-NEXT:    fcvt h0, s02341; NONEON-NOSVE-NEXT:    str h0, [sp, #50]2342; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]2343; NONEON-NOSVE-NEXT:    fcvt s0, h02344; NONEON-NOSVE-NEXT:    frintn s0, s02345; NONEON-NOSVE-NEXT:    fcvt h0, s02346; NONEON-NOSVE-NEXT:    str h0, [sp, #48]2347; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]2348; NONEON-NOSVE-NEXT:    fcvt s0, h02349; NONEON-NOSVE-NEXT:    frintn s0, s02350; NONEON-NOSVE-NEXT:    fcvt h0, s02351; NONEON-NOSVE-NEXT:    str h0, [sp, #46]2352; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]2353; NONEON-NOSVE-NEXT:    fcvt s0, h02354; NONEON-NOSVE-NEXT:    frintn s0, s02355; NONEON-NOSVE-NEXT:    fcvt h0, s02356; NONEON-NOSVE-NEXT:    str h0, [sp, #44]2357; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]2358; NONEON-NOSVE-NEXT:    fcvt s0, h02359; NONEON-NOSVE-NEXT:    frintn s0, s02360; NONEON-NOSVE-NEXT:    fcvt h0, s02361; NONEON-NOSVE-NEXT:    str h0, [sp, #42]2362; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]2363; NONEON-NOSVE-NEXT:    fcvt s0, h02364; NONEON-NOSVE-NEXT:    frintn s0, s02365; NONEON-NOSVE-NEXT:    fcvt h0, s02366; NONEON-NOSVE-NEXT:    str h0, [sp, #40]2367; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2368; NONEON-NOSVE-NEXT:    fcvt s0, h02369; NONEON-NOSVE-NEXT:    frintn s0, s02370; NONEON-NOSVE-NEXT:    fcvt h0, s02371; NONEON-NOSVE-NEXT:    str h0, [sp, #38]2372; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2373; NONEON-NOSVE-NEXT:    fcvt s0, h02374; NONEON-NOSVE-NEXT:    frintn s0, s02375; NONEON-NOSVE-NEXT:    fcvt h0, s02376; NONEON-NOSVE-NEXT:    str h0, [sp, #36]2377; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2378; NONEON-NOSVE-NEXT:    fcvt s0, h02379; NONEON-NOSVE-NEXT:    frintn s0, s02380; NONEON-NOSVE-NEXT:    fcvt h0, s02381; NONEON-NOSVE-NEXT:    str h0, [sp, #34]2382; NONEON-NOSVE-NEXT:    ldr h0, [sp]2383; NONEON-NOSVE-NEXT:    fcvt s0, h02384; NONEON-NOSVE-NEXT:    frintn s0, s02385; NONEON-NOSVE-NEXT:    fcvt h0, s02386; NONEON-NOSVE-NEXT:    str h0, [sp, #32]2387; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2388; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2389; NONEON-NOSVE-NEXT:    add sp, sp, #642390; NONEON-NOSVE-NEXT:    ret2391  %op = load <16 x half>, ptr %a2392  %res = call <16 x half> @llvm.roundeven.v16f16(<16 x half> %op)2393  store <16 x half> %res, ptr %a2394  ret void2395}2396 2397define <2 x float> @frintn_v2f32(<2 x float> %op) {2398; CHECK-LABEL: frintn_v2f32:2399; CHECK:       // %bb.0:2400; CHECK-NEXT:    ptrue p0.s, vl22401; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z02402; CHECK-NEXT:    frintn z0.s, p0/m, z0.s2403; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z02404; CHECK-NEXT:    ret2405;2406; NONEON-NOSVE-LABEL: frintn_v2f32:2407; NONEON-NOSVE:       // %bb.0:2408; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!2409; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162410; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2411; NONEON-NOSVE-NEXT:    frintn s1, s02412; NONEON-NOSVE-NEXT:    ldr s0, [sp]2413; NONEON-NOSVE-NEXT:    frintn s0, s02414; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #8]2415; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2416; NONEON-NOSVE-NEXT:    add sp, sp, #162417; NONEON-NOSVE-NEXT:    ret2418  %res = call <2 x float> @llvm.roundeven.v2f32(<2 x float> %op)2419  ret <2 x float> %res2420}2421 2422define <4 x float> @frintn_v4f32(<4 x float> %op) {2423; CHECK-LABEL: frintn_v4f32:2424; CHECK:       // %bb.0:2425; CHECK-NEXT:    ptrue p0.s, vl42426; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z02427; CHECK-NEXT:    frintn z0.s, p0/m, z0.s2428; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02429; CHECK-NEXT:    ret2430;2431; NONEON-NOSVE-LABEL: frintn_v4f32:2432; NONEON-NOSVE:       // %bb.0:2433; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2434; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322435; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]2436; NONEON-NOSVE-NEXT:    frintn s1, s02437; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]2438; NONEON-NOSVE-NEXT:    frintn s0, s02439; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #24]2440; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2441; NONEON-NOSVE-NEXT:    frintn s1, s02442; NONEON-NOSVE-NEXT:    ldr s0, [sp]2443; NONEON-NOSVE-NEXT:    frintn s0, s02444; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #16]2445; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2446; NONEON-NOSVE-NEXT:    add sp, sp, #322447; NONEON-NOSVE-NEXT:    ret2448  %res = call <4 x float> @llvm.roundeven.v4f32(<4 x float> %op)2449  ret <4 x float> %res2450}2451 2452define void @frintn_v8f32(ptr %a) {2453; CHECK-LABEL: frintn_v8f32:2454; CHECK:       // %bb.0:2455; CHECK-NEXT:    ldp q0, q1, [x0]2456; CHECK-NEXT:    ptrue p0.s, vl42457; CHECK-NEXT:    frintn z0.s, p0/m, z0.s2458; CHECK-NEXT:    frintn z1.s, p0/m, z1.s2459; CHECK-NEXT:    stp q0, q1, [x0]2460; CHECK-NEXT:    ret2461;2462; NONEON-NOSVE-LABEL: frintn_v8f32:2463; NONEON-NOSVE:       // %bb.0:2464; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2465; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2466; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642467; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]2468; NONEON-NOSVE-NEXT:    frintn s1, s02469; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]2470; NONEON-NOSVE-NEXT:    frintn s0, s02471; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #56]2472; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]2473; NONEON-NOSVE-NEXT:    frintn s1, s02474; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]2475; NONEON-NOSVE-NEXT:    frintn s0, s02476; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #48]2477; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]2478; NONEON-NOSVE-NEXT:    frintn s1, s02479; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]2480; NONEON-NOSVE-NEXT:    frintn s0, s02481; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #40]2482; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2483; NONEON-NOSVE-NEXT:    frintn s1, s02484; NONEON-NOSVE-NEXT:    ldr s0, [sp]2485; NONEON-NOSVE-NEXT:    frintn s0, s02486; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #32]2487; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2488; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2489; NONEON-NOSVE-NEXT:    add sp, sp, #642490; NONEON-NOSVE-NEXT:    ret2491  %op = load <8 x float>, ptr %a2492  %res = call <8 x float> @llvm.roundeven.v8f32(<8 x float> %op)2493  store <8 x float> %res, ptr %a2494  ret void2495}2496 2497define <1 x double> @frintn_v1f64(<1 x double> %op) {2498; CHECK-LABEL: frintn_v1f64:2499; CHECK:       // %bb.0:2500; CHECK-NEXT:    frintn d0, d02501; CHECK-NEXT:    ret2502;2503; NONEON-NOSVE-LABEL: frintn_v1f64:2504; NONEON-NOSVE:       // %bb.0:2505; NONEON-NOSVE-NEXT:    sub sp, sp, #162506; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162507; NONEON-NOSVE-NEXT:    frintn d0, d02508; NONEON-NOSVE-NEXT:    str d0, [sp, #8]2509; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2510; NONEON-NOSVE-NEXT:    add sp, sp, #162511; NONEON-NOSVE-NEXT:    ret2512  %res = call <1 x double> @llvm.roundeven.v1f64(<1 x double> %op)2513  ret <1 x double> %res2514}2515 2516define <2 x double> @frintn_v2f64(<2 x double> %op) {2517; CHECK-LABEL: frintn_v2f64:2518; CHECK:       // %bb.0:2519; CHECK-NEXT:    ptrue p0.d, vl22520; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z02521; CHECK-NEXT:    frintn z0.d, p0/m, z0.d2522; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02523; CHECK-NEXT:    ret2524;2525; NONEON-NOSVE-LABEL: frintn_v2f64:2526; NONEON-NOSVE:       // %bb.0:2527; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2528; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322529; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2530; NONEON-NOSVE-NEXT:    frintn d1, d02531; NONEON-NOSVE-NEXT:    ldr d0, [sp]2532; NONEON-NOSVE-NEXT:    frintn d0, d02533; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #16]2534; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2535; NONEON-NOSVE-NEXT:    add sp, sp, #322536; NONEON-NOSVE-NEXT:    ret2537  %res = call <2 x double> @llvm.roundeven.v2f64(<2 x double> %op)2538  ret <2 x double> %res2539}2540 2541define void @frintn_v4f64(ptr %a) {2542; CHECK-LABEL: frintn_v4f64:2543; CHECK:       // %bb.0:2544; CHECK-NEXT:    ldp q0, q1, [x0]2545; CHECK-NEXT:    ptrue p0.d, vl22546; CHECK-NEXT:    frintn z0.d, p0/m, z0.d2547; CHECK-NEXT:    frintn z1.d, p0/m, z1.d2548; CHECK-NEXT:    stp q0, q1, [x0]2549; CHECK-NEXT:    ret2550;2551; NONEON-NOSVE-LABEL: frintn_v4f64:2552; NONEON-NOSVE:       // %bb.0:2553; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2554; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2555; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642556; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]2557; NONEON-NOSVE-NEXT:    frintn d1, d02558; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]2559; NONEON-NOSVE-NEXT:    frintn d0, d02560; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #48]2561; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2562; NONEON-NOSVE-NEXT:    frintn d1, d02563; NONEON-NOSVE-NEXT:    ldr d0, [sp]2564; NONEON-NOSVE-NEXT:    frintn d0, d02565; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #32]2566; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2567; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2568; NONEON-NOSVE-NEXT:    add sp, sp, #642569; NONEON-NOSVE-NEXT:    ret2570  %op = load <4 x double>, ptr %a2571  %res = call <4 x double> @llvm.roundeven.v4f64(<4 x double> %op)2572  store <4 x double> %res, ptr %a2573  ret void2574}2575 2576;2577; TRUNC -> FRINTZ2578;2579 2580define <2 x half> @frintz_v2f16(<2 x half> %op) {2581; CHECK-LABEL: frintz_v2f16:2582; CHECK:       // %bb.0:2583; CHECK-NEXT:    ptrue p0.h, vl42584; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z02585; CHECK-NEXT:    frintz z0.h, p0/m, z0.h2586; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z02587; CHECK-NEXT:    ret2588;2589; NONEON-NOSVE-LABEL: frintz_v2f16:2590; NONEON-NOSVE:       // %bb.0:2591; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!2592; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162593; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2594; NONEON-NOSVE-NEXT:    fcvt s0, h02595; NONEON-NOSVE-NEXT:    frintz s0, s02596; NONEON-NOSVE-NEXT:    fcvt h0, s02597; NONEON-NOSVE-NEXT:    str h0, [sp, #14]2598; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2599; NONEON-NOSVE-NEXT:    fcvt s0, h02600; NONEON-NOSVE-NEXT:    frintz s0, s02601; NONEON-NOSVE-NEXT:    fcvt h0, s02602; NONEON-NOSVE-NEXT:    str h0, [sp, #12]2603; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2604; NONEON-NOSVE-NEXT:    fcvt s0, h02605; NONEON-NOSVE-NEXT:    frintz s0, s02606; NONEON-NOSVE-NEXT:    fcvt h0, s02607; NONEON-NOSVE-NEXT:    str h0, [sp, #10]2608; NONEON-NOSVE-NEXT:    ldr h0, [sp]2609; NONEON-NOSVE-NEXT:    fcvt s0, h02610; NONEON-NOSVE-NEXT:    frintz s0, s02611; NONEON-NOSVE-NEXT:    fcvt h0, s02612; NONEON-NOSVE-NEXT:    str h0, [sp, #8]2613; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2614; NONEON-NOSVE-NEXT:    add sp, sp, #162615; NONEON-NOSVE-NEXT:    ret2616  %res = call <2 x half> @llvm.trunc.v2f16(<2 x half> %op)2617  ret <2 x half> %res2618}2619 2620define <4 x half> @frintz_v4f16(<4 x half> %op) {2621; CHECK-LABEL: frintz_v4f16:2622; CHECK:       // %bb.0:2623; CHECK-NEXT:    ptrue p0.h, vl42624; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z02625; CHECK-NEXT:    frintz z0.h, p0/m, z0.h2626; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z02627; CHECK-NEXT:    ret2628;2629; NONEON-NOSVE-LABEL: frintz_v4f16:2630; NONEON-NOSVE:       // %bb.0:2631; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!2632; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162633; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2634; NONEON-NOSVE-NEXT:    fcvt s0, h02635; NONEON-NOSVE-NEXT:    frintz s0, s02636; NONEON-NOSVE-NEXT:    fcvt h0, s02637; NONEON-NOSVE-NEXT:    str h0, [sp, #14]2638; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2639; NONEON-NOSVE-NEXT:    fcvt s0, h02640; NONEON-NOSVE-NEXT:    frintz s0, s02641; NONEON-NOSVE-NEXT:    fcvt h0, s02642; NONEON-NOSVE-NEXT:    str h0, [sp, #12]2643; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2644; NONEON-NOSVE-NEXT:    fcvt s0, h02645; NONEON-NOSVE-NEXT:    frintz s0, s02646; NONEON-NOSVE-NEXT:    fcvt h0, s02647; NONEON-NOSVE-NEXT:    str h0, [sp, #10]2648; NONEON-NOSVE-NEXT:    ldr h0, [sp]2649; NONEON-NOSVE-NEXT:    fcvt s0, h02650; NONEON-NOSVE-NEXT:    frintz s0, s02651; NONEON-NOSVE-NEXT:    fcvt h0, s02652; NONEON-NOSVE-NEXT:    str h0, [sp, #8]2653; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2654; NONEON-NOSVE-NEXT:    add sp, sp, #162655; NONEON-NOSVE-NEXT:    ret2656  %res = call <4 x half> @llvm.trunc.v4f16(<4 x half> %op)2657  ret <4 x half> %res2658}2659 2660define <8 x half> @frintz_v8f16(<8 x half> %op) {2661; CHECK-LABEL: frintz_v8f16:2662; CHECK:       // %bb.0:2663; CHECK-NEXT:    ptrue p0.h, vl82664; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z02665; CHECK-NEXT:    frintz z0.h, p0/m, z0.h2666; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02667; CHECK-NEXT:    ret2668;2669; NONEON-NOSVE-LABEL: frintz_v8f16:2670; NONEON-NOSVE:       // %bb.0:2671; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2672; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322673; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]2674; NONEON-NOSVE-NEXT:    fcvt s0, h02675; NONEON-NOSVE-NEXT:    frintz s0, s02676; NONEON-NOSVE-NEXT:    fcvt h0, s02677; NONEON-NOSVE-NEXT:    str h0, [sp, #30]2678; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]2679; NONEON-NOSVE-NEXT:    fcvt s0, h02680; NONEON-NOSVE-NEXT:    frintz s0, s02681; NONEON-NOSVE-NEXT:    fcvt h0, s02682; NONEON-NOSVE-NEXT:    str h0, [sp, #28]2683; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]2684; NONEON-NOSVE-NEXT:    fcvt s0, h02685; NONEON-NOSVE-NEXT:    frintz s0, s02686; NONEON-NOSVE-NEXT:    fcvt h0, s02687; NONEON-NOSVE-NEXT:    str h0, [sp, #26]2688; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]2689; NONEON-NOSVE-NEXT:    fcvt s0, h02690; NONEON-NOSVE-NEXT:    frintz s0, s02691; NONEON-NOSVE-NEXT:    fcvt h0, s02692; NONEON-NOSVE-NEXT:    str h0, [sp, #24]2693; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2694; NONEON-NOSVE-NEXT:    fcvt s0, h02695; NONEON-NOSVE-NEXT:    frintz s0, s02696; NONEON-NOSVE-NEXT:    fcvt h0, s02697; NONEON-NOSVE-NEXT:    str h0, [sp, #22]2698; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2699; NONEON-NOSVE-NEXT:    fcvt s0, h02700; NONEON-NOSVE-NEXT:    frintz s0, s02701; NONEON-NOSVE-NEXT:    fcvt h0, s02702; NONEON-NOSVE-NEXT:    str h0, [sp, #20]2703; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2704; NONEON-NOSVE-NEXT:    fcvt s0, h02705; NONEON-NOSVE-NEXT:    frintz s0, s02706; NONEON-NOSVE-NEXT:    fcvt h0, s02707; NONEON-NOSVE-NEXT:    str h0, [sp, #18]2708; NONEON-NOSVE-NEXT:    ldr h0, [sp]2709; NONEON-NOSVE-NEXT:    fcvt s0, h02710; NONEON-NOSVE-NEXT:    frintz s0, s02711; NONEON-NOSVE-NEXT:    fcvt h0, s02712; NONEON-NOSVE-NEXT:    str h0, [sp, #16]2713; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2714; NONEON-NOSVE-NEXT:    add sp, sp, #322715; NONEON-NOSVE-NEXT:    ret2716  %res = call <8 x half> @llvm.trunc.v8f16(<8 x half> %op)2717  ret <8 x half> %res2718}2719 2720define void @frintz_v16f16(ptr %a) {2721; CHECK-LABEL: frintz_v16f16:2722; CHECK:       // %bb.0:2723; CHECK-NEXT:    ldp q0, q1, [x0]2724; CHECK-NEXT:    ptrue p0.h, vl82725; CHECK-NEXT:    frintz z0.h, p0/m, z0.h2726; CHECK-NEXT:    frintz z1.h, p0/m, z1.h2727; CHECK-NEXT:    stp q0, q1, [x0]2728; CHECK-NEXT:    ret2729;2730; NONEON-NOSVE-LABEL: frintz_v16f16:2731; NONEON-NOSVE:       // %bb.0:2732; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2733; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2734; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642735; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]2736; NONEON-NOSVE-NEXT:    fcvt s0, h02737; NONEON-NOSVE-NEXT:    frintz s0, s02738; NONEON-NOSVE-NEXT:    fcvt h0, s02739; NONEON-NOSVE-NEXT:    str h0, [sp, #62]2740; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]2741; NONEON-NOSVE-NEXT:    fcvt s0, h02742; NONEON-NOSVE-NEXT:    frintz s0, s02743; NONEON-NOSVE-NEXT:    fcvt h0, s02744; NONEON-NOSVE-NEXT:    str h0, [sp, #60]2745; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]2746; NONEON-NOSVE-NEXT:    fcvt s0, h02747; NONEON-NOSVE-NEXT:    frintz s0, s02748; NONEON-NOSVE-NEXT:    fcvt h0, s02749; NONEON-NOSVE-NEXT:    str h0, [sp, #58]2750; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]2751; NONEON-NOSVE-NEXT:    fcvt s0, h02752; NONEON-NOSVE-NEXT:    frintz s0, s02753; NONEON-NOSVE-NEXT:    fcvt h0, s02754; NONEON-NOSVE-NEXT:    str h0, [sp, #56]2755; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]2756; NONEON-NOSVE-NEXT:    fcvt s0, h02757; NONEON-NOSVE-NEXT:    frintz s0, s02758; NONEON-NOSVE-NEXT:    fcvt h0, s02759; NONEON-NOSVE-NEXT:    str h0, [sp, #54]2760; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]2761; NONEON-NOSVE-NEXT:    fcvt s0, h02762; NONEON-NOSVE-NEXT:    frintz s0, s02763; NONEON-NOSVE-NEXT:    fcvt h0, s02764; NONEON-NOSVE-NEXT:    str h0, [sp, #52]2765; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]2766; NONEON-NOSVE-NEXT:    fcvt s0, h02767; NONEON-NOSVE-NEXT:    frintz s0, s02768; NONEON-NOSVE-NEXT:    fcvt h0, s02769; NONEON-NOSVE-NEXT:    str h0, [sp, #50]2770; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]2771; NONEON-NOSVE-NEXT:    fcvt s0, h02772; NONEON-NOSVE-NEXT:    frintz s0, s02773; NONEON-NOSVE-NEXT:    fcvt h0, s02774; NONEON-NOSVE-NEXT:    str h0, [sp, #48]2775; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]2776; NONEON-NOSVE-NEXT:    fcvt s0, h02777; NONEON-NOSVE-NEXT:    frintz s0, s02778; NONEON-NOSVE-NEXT:    fcvt h0, s02779; NONEON-NOSVE-NEXT:    str h0, [sp, #46]2780; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]2781; NONEON-NOSVE-NEXT:    fcvt s0, h02782; NONEON-NOSVE-NEXT:    frintz s0, s02783; NONEON-NOSVE-NEXT:    fcvt h0, s02784; NONEON-NOSVE-NEXT:    str h0, [sp, #44]2785; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]2786; NONEON-NOSVE-NEXT:    fcvt s0, h02787; NONEON-NOSVE-NEXT:    frintz s0, s02788; NONEON-NOSVE-NEXT:    fcvt h0, s02789; NONEON-NOSVE-NEXT:    str h0, [sp, #42]2790; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]2791; NONEON-NOSVE-NEXT:    fcvt s0, h02792; NONEON-NOSVE-NEXT:    frintz s0, s02793; NONEON-NOSVE-NEXT:    fcvt h0, s02794; NONEON-NOSVE-NEXT:    str h0, [sp, #40]2795; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]2796; NONEON-NOSVE-NEXT:    fcvt s0, h02797; NONEON-NOSVE-NEXT:    frintz s0, s02798; NONEON-NOSVE-NEXT:    fcvt h0, s02799; NONEON-NOSVE-NEXT:    str h0, [sp, #38]2800; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]2801; NONEON-NOSVE-NEXT:    fcvt s0, h02802; NONEON-NOSVE-NEXT:    frintz s0, s02803; NONEON-NOSVE-NEXT:    fcvt h0, s02804; NONEON-NOSVE-NEXT:    str h0, [sp, #36]2805; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]2806; NONEON-NOSVE-NEXT:    fcvt s0, h02807; NONEON-NOSVE-NEXT:    frintz s0, s02808; NONEON-NOSVE-NEXT:    fcvt h0, s02809; NONEON-NOSVE-NEXT:    str h0, [sp, #34]2810; NONEON-NOSVE-NEXT:    ldr h0, [sp]2811; NONEON-NOSVE-NEXT:    fcvt s0, h02812; NONEON-NOSVE-NEXT:    frintz s0, s02813; NONEON-NOSVE-NEXT:    fcvt h0, s02814; NONEON-NOSVE-NEXT:    str h0, [sp, #32]2815; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2816; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2817; NONEON-NOSVE-NEXT:    add sp, sp, #642818; NONEON-NOSVE-NEXT:    ret2819  %op = load <16 x half>, ptr %a2820  %res = call <16 x half> @llvm.trunc.v16f16(<16 x half> %op)2821  store <16 x half> %res, ptr %a2822  ret void2823}2824 2825define <2 x float> @frintz_v2f32(<2 x float> %op) {2826; CHECK-LABEL: frintz_v2f32:2827; CHECK:       // %bb.0:2828; CHECK-NEXT:    ptrue p0.s, vl22829; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z02830; CHECK-NEXT:    frintz z0.s, p0/m, z0.s2831; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z02832; CHECK-NEXT:    ret2833;2834; NONEON-NOSVE-LABEL: frintz_v2f32:2835; NONEON-NOSVE:       // %bb.0:2836; NONEON-NOSVE-NEXT:    str d0, [sp, #-16]!2837; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162838; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2839; NONEON-NOSVE-NEXT:    frintz s1, s02840; NONEON-NOSVE-NEXT:    ldr s0, [sp]2841; NONEON-NOSVE-NEXT:    frintz s0, s02842; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #8]2843; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2844; NONEON-NOSVE-NEXT:    add sp, sp, #162845; NONEON-NOSVE-NEXT:    ret2846  %res = call <2 x float> @llvm.trunc.v2f32(<2 x float> %op)2847  ret <2 x float> %res2848}2849 2850define <4 x float> @frintz_v4f32(<4 x float> %op) {2851; CHECK-LABEL: frintz_v4f32:2852; CHECK:       // %bb.0:2853; CHECK-NEXT:    ptrue p0.s, vl42854; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z02855; CHECK-NEXT:    frintz z0.s, p0/m, z0.s2856; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02857; CHECK-NEXT:    ret2858;2859; NONEON-NOSVE-LABEL: frintz_v4f32:2860; NONEON-NOSVE:       // %bb.0:2861; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2862; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322863; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]2864; NONEON-NOSVE-NEXT:    frintz s1, s02865; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]2866; NONEON-NOSVE-NEXT:    frintz s0, s02867; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #24]2868; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2869; NONEON-NOSVE-NEXT:    frintz s1, s02870; NONEON-NOSVE-NEXT:    ldr s0, [sp]2871; NONEON-NOSVE-NEXT:    frintz s0, s02872; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #16]2873; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2874; NONEON-NOSVE-NEXT:    add sp, sp, #322875; NONEON-NOSVE-NEXT:    ret2876  %res = call <4 x float> @llvm.trunc.v4f32(<4 x float> %op)2877  ret <4 x float> %res2878}2879 2880define void @frintz_v8f32(ptr %a) {2881; CHECK-LABEL: frintz_v8f32:2882; CHECK:       // %bb.0:2883; CHECK-NEXT:    ldp q0, q1, [x0]2884; CHECK-NEXT:    ptrue p0.s, vl42885; CHECK-NEXT:    frintz z0.s, p0/m, z0.s2886; CHECK-NEXT:    frintz z1.s, p0/m, z1.s2887; CHECK-NEXT:    stp q0, q1, [x0]2888; CHECK-NEXT:    ret2889;2890; NONEON-NOSVE-LABEL: frintz_v8f32:2891; NONEON-NOSVE:       // %bb.0:2892; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2893; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2894; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642895; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]2896; NONEON-NOSVE-NEXT:    frintz s1, s02897; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]2898; NONEON-NOSVE-NEXT:    frintz s0, s02899; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #56]2900; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]2901; NONEON-NOSVE-NEXT:    frintz s1, s02902; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]2903; NONEON-NOSVE-NEXT:    frintz s0, s02904; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #48]2905; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]2906; NONEON-NOSVE-NEXT:    frintz s1, s02907; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]2908; NONEON-NOSVE-NEXT:    frintz s0, s02909; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #40]2910; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]2911; NONEON-NOSVE-NEXT:    frintz s1, s02912; NONEON-NOSVE-NEXT:    ldr s0, [sp]2913; NONEON-NOSVE-NEXT:    frintz s0, s02914; NONEON-NOSVE-NEXT:    stp s0, s1, [sp, #32]2915; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2916; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2917; NONEON-NOSVE-NEXT:    add sp, sp, #642918; NONEON-NOSVE-NEXT:    ret2919  %op = load <8 x float>, ptr %a2920  %res = call <8 x float> @llvm.trunc.v8f32(<8 x float> %op)2921  store <8 x float> %res, ptr %a2922  ret void2923}2924 2925define <1 x double> @frintz_v1f64(<1 x double> %op) {2926; CHECK-LABEL: frintz_v1f64:2927; CHECK:       // %bb.0:2928; CHECK-NEXT:    frintz d0, d02929; CHECK-NEXT:    ret2930;2931; NONEON-NOSVE-LABEL: frintz_v1f64:2932; NONEON-NOSVE:       // %bb.0:2933; NONEON-NOSVE-NEXT:    sub sp, sp, #162934; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 162935; NONEON-NOSVE-NEXT:    frintz d0, d02936; NONEON-NOSVE-NEXT:    str d0, [sp, #8]2937; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2938; NONEON-NOSVE-NEXT:    add sp, sp, #162939; NONEON-NOSVE-NEXT:    ret2940  %res = call <1 x double> @llvm.trunc.v1f64(<1 x double> %op)2941  ret <1 x double> %res2942}2943 2944define <2 x double> @frintz_v2f64(<2 x double> %op) {2945; CHECK-LABEL: frintz_v2f64:2946; CHECK:       // %bb.0:2947; CHECK-NEXT:    ptrue p0.d, vl22948; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z02949; CHECK-NEXT:    frintz z0.d, p0/m, z0.d2950; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z02951; CHECK-NEXT:    ret2952;2953; NONEON-NOSVE-LABEL: frintz_v2f64:2954; NONEON-NOSVE:       // %bb.0:2955; NONEON-NOSVE-NEXT:    str q0, [sp, #-32]!2956; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 322957; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2958; NONEON-NOSVE-NEXT:    frintz d1, d02959; NONEON-NOSVE-NEXT:    ldr d0, [sp]2960; NONEON-NOSVE-NEXT:    frintz d0, d02961; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #16]2962; NONEON-NOSVE-NEXT:    ldr q0, [sp, #16]2963; NONEON-NOSVE-NEXT:    add sp, sp, #322964; NONEON-NOSVE-NEXT:    ret2965  %res = call <2 x double> @llvm.trunc.v2f64(<2 x double> %op)2966  ret <2 x double> %res2967}2968 2969define void @frintz_v4f64(ptr %a) {2970; CHECK-LABEL: frintz_v4f64:2971; CHECK:       // %bb.0:2972; CHECK-NEXT:    ldp q0, q1, [x0]2973; CHECK-NEXT:    ptrue p0.d, vl22974; CHECK-NEXT:    frintz z0.d, p0/m, z0.d2975; CHECK-NEXT:    frintz z1.d, p0/m, z1.d2976; CHECK-NEXT:    stp q0, q1, [x0]2977; CHECK-NEXT:    ret2978;2979; NONEON-NOSVE-LABEL: frintz_v4f64:2980; NONEON-NOSVE:       // %bb.0:2981; NONEON-NOSVE-NEXT:    ldp q1, q0, [x0]2982; NONEON-NOSVE-NEXT:    stp q1, q0, [sp, #-64]!2983; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 642984; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]2985; NONEON-NOSVE-NEXT:    frintz d1, d02986; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]2987; NONEON-NOSVE-NEXT:    frintz d0, d02988; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #48]2989; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]2990; NONEON-NOSVE-NEXT:    frintz d1, d02991; NONEON-NOSVE-NEXT:    ldr d0, [sp]2992; NONEON-NOSVE-NEXT:    frintz d0, d02993; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #32]2994; NONEON-NOSVE-NEXT:    ldp q0, q1, [sp, #32]2995; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]2996; NONEON-NOSVE-NEXT:    add sp, sp, #642997; NONEON-NOSVE-NEXT:    ret2998  %op = load <4 x double>, ptr %a2999  %res = call <4 x double> @llvm.trunc.v4f64(<4 x double> %op)3000  store <4 x double> %res, ptr %a3001  ret void3002}3003 3004declare <2 x half> @llvm.ceil.v2f16(<2 x half>)3005declare <4 x half> @llvm.ceil.v4f16(<4 x half>)3006declare <8 x half> @llvm.ceil.v8f16(<8 x half>)3007declare <16 x half> @llvm.ceil.v16f16(<16 x half>)3008declare <32 x half> @llvm.ceil.v32f16(<32 x half>)3009declare <64 x half> @llvm.ceil.v64f16(<64 x half>)3010declare <128 x half> @llvm.ceil.v128f16(<128 x half>)3011declare <2 x float> @llvm.ceil.v2f32(<2 x float>)3012declare <4 x float> @llvm.ceil.v4f32(<4 x float>)3013declare <8 x float> @llvm.ceil.v8f32(<8 x float>)3014declare <16 x float> @llvm.ceil.v16f32(<16 x float>)3015declare <32 x float> @llvm.ceil.v32f32(<32 x float>)3016declare <64 x float> @llvm.ceil.v64f32(<64 x float>)3017declare <1 x double> @llvm.ceil.v1f64(<1 x double>)3018declare <2 x double> @llvm.ceil.v2f64(<2 x double>)3019declare <4 x double> @llvm.ceil.v4f64(<4 x double>)3020declare <8 x double> @llvm.ceil.v8f64(<8 x double>)3021declare <16 x double> @llvm.ceil.v16f64(<16 x double>)3022declare <32 x double> @llvm.ceil.v32f64(<32 x double>)3023 3024declare <2 x half> @llvm.floor.v2f16(<2 x half>)3025declare <4 x half> @llvm.floor.v4f16(<4 x half>)3026declare <8 x half> @llvm.floor.v8f16(<8 x half>)3027declare <16 x half> @llvm.floor.v16f16(<16 x half>)3028declare <32 x half> @llvm.floor.v32f16(<32 x half>)3029declare <64 x half> @llvm.floor.v64f16(<64 x half>)3030declare <128 x half> @llvm.floor.v128f16(<128 x half>)3031declare <2 x float> @llvm.floor.v2f32(<2 x float>)3032declare <4 x float> @llvm.floor.v4f32(<4 x float>)3033declare <8 x float> @llvm.floor.v8f32(<8 x float>)3034declare <16 x float> @llvm.floor.v16f32(<16 x float>)3035declare <32 x float> @llvm.floor.v32f32(<32 x float>)3036declare <64 x float> @llvm.floor.v64f32(<64 x float>)3037declare <1 x double> @llvm.floor.v1f64(<1 x double>)3038declare <2 x double> @llvm.floor.v2f64(<2 x double>)3039declare <4 x double> @llvm.floor.v4f64(<4 x double>)3040declare <8 x double> @llvm.floor.v8f64(<8 x double>)3041declare <16 x double> @llvm.floor.v16f64(<16 x double>)3042declare <32 x double> @llvm.floor.v32f64(<32 x double>)3043 3044declare <2 x half> @llvm.nearbyint.v2f16(<2 x half>)3045declare <4 x half> @llvm.nearbyint.v4f16(<4 x half>)3046declare <8 x half> @llvm.nearbyint.v8f16(<8 x half>)3047declare <16 x half> @llvm.nearbyint.v16f16(<16 x half>)3048declare <32 x half> @llvm.nearbyint.v32f16(<32 x half>)3049declare <64 x half> @llvm.nearbyint.v64f16(<64 x half>)3050declare <128 x half> @llvm.nearbyint.v128f16(<128 x half>)3051declare <2 x float> @llvm.nearbyint.v2f32(<2 x float>)3052declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>)3053declare <8 x float> @llvm.nearbyint.v8f32(<8 x float>)3054declare <16 x float> @llvm.nearbyint.v16f32(<16 x float>)3055declare <32 x float> @llvm.nearbyint.v32f32(<32 x float>)3056declare <64 x float> @llvm.nearbyint.v64f32(<64 x float>)3057declare <1 x double> @llvm.nearbyint.v1f64(<1 x double>)3058declare <2 x double> @llvm.nearbyint.v2f64(<2 x double>)3059declare <4 x double> @llvm.nearbyint.v4f64(<4 x double>)3060declare <8 x double> @llvm.nearbyint.v8f64(<8 x double>)3061declare <16 x double> @llvm.nearbyint.v16f64(<16 x double>)3062declare <32 x double> @llvm.nearbyint.v32f64(<32 x double>)3063 3064declare <2 x half> @llvm.rint.v2f16(<2 x half>)3065declare <4 x half> @llvm.rint.v4f16(<4 x half>)3066declare <8 x half> @llvm.rint.v8f16(<8 x half>)3067declare <16 x half> @llvm.rint.v16f16(<16 x half>)3068declare <32 x half> @llvm.rint.v32f16(<32 x half>)3069declare <64 x half> @llvm.rint.v64f16(<64 x half>)3070declare <128 x half> @llvm.rint.v128f16(<128 x half>)3071declare <2 x float> @llvm.rint.v2f32(<2 x float>)3072declare <4 x float> @llvm.rint.v4f32(<4 x float>)3073declare <8 x float> @llvm.rint.v8f32(<8 x float>)3074declare <16 x float> @llvm.rint.v16f32(<16 x float>)3075declare <32 x float> @llvm.rint.v32f32(<32 x float>)3076declare <64 x float> @llvm.rint.v64f32(<64 x float>)3077declare <1 x double> @llvm.rint.v1f64(<1 x double>)3078declare <2 x double> @llvm.rint.v2f64(<2 x double>)3079declare <4 x double> @llvm.rint.v4f64(<4 x double>)3080declare <8 x double> @llvm.rint.v8f64(<8 x double>)3081declare <16 x double> @llvm.rint.v16f64(<16 x double>)3082declare <32 x double> @llvm.rint.v32f64(<32 x double>)3083 3084declare <2 x half> @llvm.round.v2f16(<2 x half>)3085declare <4 x half> @llvm.round.v4f16(<4 x half>)3086declare <8 x half> @llvm.round.v8f16(<8 x half>)3087declare <16 x half> @llvm.round.v16f16(<16 x half>)3088declare <32 x half> @llvm.round.v32f16(<32 x half>)3089declare <64 x half> @llvm.round.v64f16(<64 x half>)3090declare <128 x half> @llvm.round.v128f16(<128 x half>)3091declare <2 x float> @llvm.round.v2f32(<2 x float>)3092declare <4 x float> @llvm.round.v4f32(<4 x float>)3093declare <8 x float> @llvm.round.v8f32(<8 x float>)3094declare <16 x float> @llvm.round.v16f32(<16 x float>)3095declare <32 x float> @llvm.round.v32f32(<32 x float>)3096declare <64 x float> @llvm.round.v64f32(<64 x float>)3097declare <1 x double> @llvm.round.v1f64(<1 x double>)3098declare <2 x double> @llvm.round.v2f64(<2 x double>)3099declare <4 x double> @llvm.round.v4f64(<4 x double>)3100declare <8 x double> @llvm.round.v8f64(<8 x double>)3101declare <16 x double> @llvm.round.v16f64(<16 x double>)3102declare <32 x double> @llvm.round.v32f64(<32 x double>)3103 3104declare <2 x half> @llvm.roundeven.v2f16(<2 x half>)3105declare <4 x half> @llvm.roundeven.v4f16(<4 x half>)3106declare <8 x half> @llvm.roundeven.v8f16(<8 x half>)3107declare <16 x half> @llvm.roundeven.v16f16(<16 x half>)3108declare <32 x half> @llvm.roundeven.v32f16(<32 x half>)3109declare <64 x half> @llvm.roundeven.v64f16(<64 x half>)3110declare <128 x half> @llvm.roundeven.v128f16(<128 x half>)3111declare <2 x float> @llvm.roundeven.v2f32(<2 x float>)3112declare <4 x float> @llvm.roundeven.v4f32(<4 x float>)3113declare <8 x float> @llvm.roundeven.v8f32(<8 x float>)3114declare <16 x float> @llvm.roundeven.v16f32(<16 x float>)3115declare <32 x float> @llvm.roundeven.v32f32(<32 x float>)3116declare <64 x float> @llvm.roundeven.v64f32(<64 x float>)3117declare <1 x double> @llvm.roundeven.v1f64(<1 x double>)3118declare <2 x double> @llvm.roundeven.v2f64(<2 x double>)3119declare <4 x double> @llvm.roundeven.v4f64(<4 x double>)3120declare <8 x double> @llvm.roundeven.v8f64(<8 x double>)3121declare <16 x double> @llvm.roundeven.v16f64(<16 x double>)3122declare <32 x double> @llvm.roundeven.v32f64(<32 x double>)3123 3124declare <2 x half> @llvm.trunc.v2f16(<2 x half>)3125declare <4 x half> @llvm.trunc.v4f16(<4 x half>)3126declare <8 x half> @llvm.trunc.v8f16(<8 x half>)3127declare <16 x half> @llvm.trunc.v16f16(<16 x half>)3128declare <32 x half> @llvm.trunc.v32f16(<32 x half>)3129declare <64 x half> @llvm.trunc.v64f16(<64 x half>)3130declare <128 x half> @llvm.trunc.v128f16(<128 x half>)3131declare <2 x float> @llvm.trunc.v2f32(<2 x float>)3132declare <4 x float> @llvm.trunc.v4f32(<4 x float>)3133declare <8 x float> @llvm.trunc.v8f32(<8 x float>)3134declare <16 x float> @llvm.trunc.v16f32(<16 x float>)3135declare <32 x float> @llvm.trunc.v32f32(<32 x float>)3136declare <64 x float> @llvm.trunc.v64f32(<64 x float>)3137declare <1 x double> @llvm.trunc.v1f64(<1 x double>)3138declare <2 x double> @llvm.trunc.v2f64(<2 x double>)3139declare <4 x double> @llvm.trunc.v4f64(<4 x double>)3140declare <8 x double> @llvm.trunc.v8f64(<8 x double>)3141declare <16 x double> @llvm.trunc.v16f64(<16 x double>)3142declare <32 x double> @llvm.trunc.v32f64(<32 x double>)3143