brintos

brintos / llvm-project-archived public Read only

0
0
Text · 18.3 KiB · bcc446d Raw
488 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 8define <2 x half> @select_v2f16(<2 x half> %op1, <2 x half> %op2, i1 %mask) {9; CHECK-LABEL: select_v2f16:10; CHECK:       // %bb.0:11; CHECK-NEXT:    mov z2.h, w012; CHECK-NEXT:    ptrue p0.h13; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z014; CHECK-NEXT:    // kill: def $d1 killed $d1 def $z115; CHECK-NEXT:    and z2.h, z2.h, #0x116; CHECK-NEXT:    cmpne p0.h, p0/z, z2.h, #017; CHECK-NEXT:    sel z0.h, p0, z0.h, z1.h18; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z019; CHECK-NEXT:    ret20;21; NONEON-NOSVE-LABEL: select_v2f16:22; NONEON-NOSVE:       // %bb.0:23; NONEON-NOSVE-NEXT:    sub sp, sp, #3224; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 3225; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #8]26; NONEON-NOSVE-NEXT:    tst w0, #0x127; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]28; NONEON-NOSVE-NEXT:    ldr h1, [sp, #14]29; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne30; NONEON-NOSVE-NEXT:    ldr h1, [sp, #12]31; NONEON-NOSVE-NEXT:    str h0, [sp, #30]32; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]33; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne34; NONEON-NOSVE-NEXT:    ldr h1, [sp, #10]35; NONEON-NOSVE-NEXT:    str h0, [sp, #28]36; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]37; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne38; NONEON-NOSVE-NEXT:    ldr h1, [sp, #8]39; NONEON-NOSVE-NEXT:    str h0, [sp, #26]40; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]41; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne42; NONEON-NOSVE-NEXT:    str h0, [sp, #24]43; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]44; NONEON-NOSVE-NEXT:    add sp, sp, #3245; NONEON-NOSVE-NEXT:    ret46  %sel = select i1 %mask, <2 x half> %op1, <2 x half> %op247  ret <2 x half> %sel48}49 50define <4 x half> @select_v4f16(<4 x half> %op1, <4 x half> %op2, i1 %mask) {51; CHECK-LABEL: select_v4f16:52; CHECK:       // %bb.0:53; CHECK-NEXT:    mov z2.h, w054; CHECK-NEXT:    ptrue p0.h55; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z056; CHECK-NEXT:    // kill: def $d1 killed $d1 def $z157; CHECK-NEXT:    and z2.h, z2.h, #0x158; CHECK-NEXT:    cmpne p0.h, p0/z, z2.h, #059; CHECK-NEXT:    sel z0.h, p0, z0.h, z1.h60; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z061; CHECK-NEXT:    ret62;63; NONEON-NOSVE-LABEL: select_v4f16:64; NONEON-NOSVE:       // %bb.0:65; NONEON-NOSVE-NEXT:    sub sp, sp, #3266; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 3267; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #8]68; NONEON-NOSVE-NEXT:    tst w0, #0x169; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]70; NONEON-NOSVE-NEXT:    ldr h1, [sp, #14]71; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne72; NONEON-NOSVE-NEXT:    ldr h1, [sp, #12]73; NONEON-NOSVE-NEXT:    str h0, [sp, #30]74; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]75; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne76; NONEON-NOSVE-NEXT:    ldr h1, [sp, #10]77; NONEON-NOSVE-NEXT:    str h0, [sp, #28]78; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]79; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne80; NONEON-NOSVE-NEXT:    ldr h1, [sp, #8]81; NONEON-NOSVE-NEXT:    str h0, [sp, #26]82; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]83; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne84; NONEON-NOSVE-NEXT:    str h0, [sp, #24]85; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]86; NONEON-NOSVE-NEXT:    add sp, sp, #3287; NONEON-NOSVE-NEXT:    ret88  %sel = select i1 %mask, <4 x half> %op1, <4 x half> %op289  ret <4 x half> %sel90}91 92define <8 x half> @select_v8f16(<8 x half> %op1, <8 x half> %op2, i1 %mask) {93; CHECK-LABEL: select_v8f16:94; CHECK:       // %bb.0:95; CHECK-NEXT:    mov z2.h, w096; CHECK-NEXT:    ptrue p0.h97; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z098; CHECK-NEXT:    // kill: def $q1 killed $q1 def $z199; CHECK-NEXT:    and z2.h, z2.h, #0x1100; CHECK-NEXT:    cmpne p0.h, p0/z, z2.h, #0101; CHECK-NEXT:    sel z0.h, p0, z0.h, z1.h102; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0103; CHECK-NEXT:    ret104;105; NONEON-NOSVE-LABEL: select_v8f16:106; NONEON-NOSVE:       // %bb.0:107; NONEON-NOSVE-NEXT:    stp q0, q1, [sp, #-48]!108; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 48109; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]110; NONEON-NOSVE-NEXT:    ldr h1, [sp, #14]111; NONEON-NOSVE-NEXT:    tst w0, #0x1112; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne113; NONEON-NOSVE-NEXT:    ldr h1, [sp, #12]114; NONEON-NOSVE-NEXT:    str h0, [sp, #46]115; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]116; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne117; NONEON-NOSVE-NEXT:    ldr h1, [sp, #10]118; NONEON-NOSVE-NEXT:    str h0, [sp, #44]119; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]120; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne121; NONEON-NOSVE-NEXT:    ldr h1, [sp, #8]122; NONEON-NOSVE-NEXT:    str h0, [sp, #42]123; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]124; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne125; NONEON-NOSVE-NEXT:    ldr h1, [sp, #6]126; NONEON-NOSVE-NEXT:    str h0, [sp, #40]127; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]128; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne129; NONEON-NOSVE-NEXT:    ldr h1, [sp, #4]130; NONEON-NOSVE-NEXT:    str h0, [sp, #38]131; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]132; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne133; NONEON-NOSVE-NEXT:    ldr h1, [sp, #2]134; NONEON-NOSVE-NEXT:    str h0, [sp, #36]135; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]136; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne137; NONEON-NOSVE-NEXT:    ldr h1, [sp]138; NONEON-NOSVE-NEXT:    str h0, [sp, #34]139; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]140; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne141; NONEON-NOSVE-NEXT:    str h0, [sp, #32]142; NONEON-NOSVE-NEXT:    ldr q0, [sp, #32]143; NONEON-NOSVE-NEXT:    add sp, sp, #48144; NONEON-NOSVE-NEXT:    ret145  %sel = select i1 %mask, <8 x half> %op1, <8 x half> %op2146  ret <8 x half> %sel147}148 149define void @select_v16f16(ptr %a, ptr %b, i1 %mask) {150; CHECK-LABEL: select_v16f16:151; CHECK:       // %bb.0:152; CHECK-NEXT:    mov z0.h, w2153; CHECK-NEXT:    ptrue p0.h154; CHECK-NEXT:    and z0.h, z0.h, #0x1155; CHECK-NEXT:    cmpne p0.h, p0/z, z0.h, #0156; CHECK-NEXT:    ldr q0, [x0]157; CHECK-NEXT:    ldr q1, [x0, #16]158; CHECK-NEXT:    ldr q2, [x1]159; CHECK-NEXT:    ldr q3, [x1, #16]160; CHECK-NEXT:    sel z0.h, p0, z0.h, z2.h161; CHECK-NEXT:    sel z1.h, p0, z1.h, z3.h162; CHECK-NEXT:    stp q0, q1, [x0]163; CHECK-NEXT:    ret164;165; NONEON-NOSVE-LABEL: select_v16f16:166; NONEON-NOSVE:       // %bb.0:167; NONEON-NOSVE-NEXT:    sub sp, sp, #96168; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 96169; NONEON-NOSVE-NEXT:    ldr q0, [x0]170; NONEON-NOSVE-NEXT:    ldr q1, [x0, #16]171; NONEON-NOSVE-NEXT:    tst w2, #0x1172; NONEON-NOSVE-NEXT:    ldr q2, [x1]173; NONEON-NOSVE-NEXT:    ldr q3, [x1, #16]174; NONEON-NOSVE-NEXT:    str q0, [sp]175; NONEON-NOSVE-NEXT:    stp q1, q3, [sp, #16]176; NONEON-NOSVE-NEXT:    ldr h0, [sp, #30]177; NONEON-NOSVE-NEXT:    ldr h1, [sp, #46]178; NONEON-NOSVE-NEXT:    str q2, [sp, #48]179; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne180; NONEON-NOSVE-NEXT:    ldr h1, [sp, #44]181; NONEON-NOSVE-NEXT:    str h0, [sp, #78]182; NONEON-NOSVE-NEXT:    ldr h0, [sp, #28]183; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne184; NONEON-NOSVE-NEXT:    ldr h1, [sp, #42]185; NONEON-NOSVE-NEXT:    str h0, [sp, #76]186; NONEON-NOSVE-NEXT:    ldr h0, [sp, #26]187; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne188; NONEON-NOSVE-NEXT:    ldr h1, [sp, #40]189; NONEON-NOSVE-NEXT:    str h0, [sp, #74]190; NONEON-NOSVE-NEXT:    ldr h0, [sp, #24]191; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne192; NONEON-NOSVE-NEXT:    ldr h1, [sp, #38]193; NONEON-NOSVE-NEXT:    str h0, [sp, #72]194; NONEON-NOSVE-NEXT:    ldr h0, [sp, #22]195; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne196; NONEON-NOSVE-NEXT:    ldr h1, [sp, #36]197; NONEON-NOSVE-NEXT:    str h0, [sp, #70]198; NONEON-NOSVE-NEXT:    ldr h0, [sp, #20]199; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne200; NONEON-NOSVE-NEXT:    ldr h1, [sp, #34]201; NONEON-NOSVE-NEXT:    str h0, [sp, #68]202; NONEON-NOSVE-NEXT:    ldr h0, [sp, #18]203; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne204; NONEON-NOSVE-NEXT:    ldr h1, [sp, #32]205; NONEON-NOSVE-NEXT:    str h0, [sp, #66]206; NONEON-NOSVE-NEXT:    ldr h0, [sp, #16]207; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne208; NONEON-NOSVE-NEXT:    ldr h1, [sp, #62]209; NONEON-NOSVE-NEXT:    str h0, [sp, #64]210; NONEON-NOSVE-NEXT:    ldr h0, [sp, #14]211; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne212; NONEON-NOSVE-NEXT:    ldr h1, [sp, #60]213; NONEON-NOSVE-NEXT:    str h0, [sp, #94]214; NONEON-NOSVE-NEXT:    ldr h0, [sp, #12]215; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne216; NONEON-NOSVE-NEXT:    ldr h1, [sp, #58]217; NONEON-NOSVE-NEXT:    str h0, [sp, #92]218; NONEON-NOSVE-NEXT:    ldr h0, [sp, #10]219; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne220; NONEON-NOSVE-NEXT:    ldr h1, [sp, #56]221; NONEON-NOSVE-NEXT:    str h0, [sp, #90]222; NONEON-NOSVE-NEXT:    ldr h0, [sp, #8]223; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne224; NONEON-NOSVE-NEXT:    ldr h1, [sp, #54]225; NONEON-NOSVE-NEXT:    str h0, [sp, #88]226; NONEON-NOSVE-NEXT:    ldr h0, [sp, #6]227; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne228; NONEON-NOSVE-NEXT:    ldr h1, [sp, #52]229; NONEON-NOSVE-NEXT:    str h0, [sp, #86]230; NONEON-NOSVE-NEXT:    ldr h0, [sp, #4]231; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne232; NONEON-NOSVE-NEXT:    ldr h1, [sp, #50]233; NONEON-NOSVE-NEXT:    str h0, [sp, #84]234; NONEON-NOSVE-NEXT:    ldr h0, [sp, #2]235; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne236; NONEON-NOSVE-NEXT:    ldr h1, [sp, #48]237; NONEON-NOSVE-NEXT:    str h0, [sp, #82]238; NONEON-NOSVE-NEXT:    ldr h0, [sp]239; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne240; NONEON-NOSVE-NEXT:    str h0, [sp, #80]241; NONEON-NOSVE-NEXT:    ldp q1, q0, [sp, #64]242; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]243; NONEON-NOSVE-NEXT:    add sp, sp, #96244; NONEON-NOSVE-NEXT:    ret245  %op1 = load volatile <16 x half>, ptr %a246  %op2 = load volatile <16 x half>, ptr %b247  %sel = select i1 %mask, <16 x half> %op1, <16 x half> %op2248  store <16 x half> %sel, ptr %a249  ret void250}251 252define <2 x float> @select_v2f32(<2 x float> %op1, <2 x float> %op2, i1 %mask) {253; CHECK-LABEL: select_v2f32:254; CHECK:       // %bb.0:255; CHECK-NEXT:    and w8, w0, #0x1256; CHECK-NEXT:    ptrue p0.s257; CHECK-NEXT:    // kill: def $d0 killed $d0 def $z0258; CHECK-NEXT:    // kill: def $d1 killed $d1 def $z1259; CHECK-NEXT:    mov z2.s, w8260; CHECK-NEXT:    cmpne p0.s, p0/z, z2.s, #0261; CHECK-NEXT:    sel z0.s, p0, z0.s, z1.s262; CHECK-NEXT:    // kill: def $d0 killed $d0 killed $z0263; CHECK-NEXT:    ret264;265; NONEON-NOSVE-LABEL: select_v2f32:266; NONEON-NOSVE:       // %bb.0:267; NONEON-NOSVE-NEXT:    sub sp, sp, #32268; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 32269; NONEON-NOSVE-NEXT:    stp d0, d1, [sp, #8]270; NONEON-NOSVE-NEXT:    tst w0, #0x1271; NONEON-NOSVE-NEXT:    ldp s1, s2, [sp, #8]272; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]273; NONEON-NOSVE-NEXT:    fcsel s3, s2, s0, ne274; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]275; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne276; NONEON-NOSVE-NEXT:    stp s0, s3, [sp, #24]277; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]278; NONEON-NOSVE-NEXT:    add sp, sp, #32279; NONEON-NOSVE-NEXT:    ret280  %sel = select i1 %mask, <2 x float> %op1, <2 x float> %op2281  ret <2 x float> %sel282}283 284define <4 x float> @select_v4f32(<4 x float> %op1, <4 x float> %op2, i1 %mask) {285; CHECK-LABEL: select_v4f32:286; CHECK:       // %bb.0:287; CHECK-NEXT:    and w8, w0, #0x1288; CHECK-NEXT:    ptrue p0.s289; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0290; CHECK-NEXT:    // kill: def $q1 killed $q1 def $z1291; CHECK-NEXT:    mov z2.s, w8292; CHECK-NEXT:    cmpne p0.s, p0/z, z2.s, #0293; CHECK-NEXT:    sel z0.s, p0, z0.s, z1.s294; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0295; CHECK-NEXT:    ret296;297; NONEON-NOSVE-LABEL: select_v4f32:298; NONEON-NOSVE:       // %bb.0:299; NONEON-NOSVE-NEXT:    stp q0, q1, [sp, #-48]!300; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 48301; NONEON-NOSVE-NEXT:    ldp s1, s2, [sp, #8]302; NONEON-NOSVE-NEXT:    tst w0, #0x1303; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]304; NONEON-NOSVE-NEXT:    fcsel s3, s2, s0, ne305; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]306; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne307; NONEON-NOSVE-NEXT:    ldp s1, s2, [sp]308; NONEON-NOSVE-NEXT:    stp s0, s3, [sp, #40]309; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]310; NONEON-NOSVE-NEXT:    fcsel s3, s2, s0, ne311; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]312; NONEON-NOSVE-NEXT:    fcsel s0, s1, s0, ne313; NONEON-NOSVE-NEXT:    stp s0, s3, [sp, #32]314; NONEON-NOSVE-NEXT:    ldr q0, [sp, #32]315; NONEON-NOSVE-NEXT:    add sp, sp, #48316; NONEON-NOSVE-NEXT:    ret317  %sel = select i1 %mask, <4 x float> %op1, <4 x float> %op2318  ret <4 x float> %sel319}320 321define void @select_v8f32(ptr %a, ptr %b, i1 %mask) {322; CHECK-LABEL: select_v8f32:323; CHECK:       // %bb.0:324; CHECK-NEXT:    and w8, w2, #0x1325; CHECK-NEXT:    ptrue p0.s326; CHECK-NEXT:    mov z0.s, w8327; CHECK-NEXT:    cmpne p0.s, p0/z, z0.s, #0328; CHECK-NEXT:    ldr q0, [x0]329; CHECK-NEXT:    ldr q1, [x0, #16]330; CHECK-NEXT:    ldr q2, [x1]331; CHECK-NEXT:    ldr q3, [x1, #16]332; CHECK-NEXT:    sel z0.s, p0, z0.s, z2.s333; CHECK-NEXT:    sel z1.s, p0, z1.s, z3.s334; CHECK-NEXT:    stp q0, q1, [x0]335; CHECK-NEXT:    ret336;337; NONEON-NOSVE-LABEL: select_v8f32:338; NONEON-NOSVE:       // %bb.0:339; NONEON-NOSVE-NEXT:    sub sp, sp, #96340; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 96341; NONEON-NOSVE-NEXT:    ldr q0, [x0]342; NONEON-NOSVE-NEXT:    ldr q1, [x0, #16]343; NONEON-NOSVE-NEXT:    tst w2, #0x1344; NONEON-NOSVE-NEXT:    ldr q2, [x1]345; NONEON-NOSVE-NEXT:    ldr q3, [x1, #16]346; NONEON-NOSVE-NEXT:    str q0, [sp]347; NONEON-NOSVE-NEXT:    stp q1, q3, [sp, #16]348; NONEON-NOSVE-NEXT:    str q2, [sp, #48]349; NONEON-NOSVE-NEXT:    ldp s1, s2, [sp, #40]350; NONEON-NOSVE-NEXT:    ldr s0, [sp, #28]351; NONEON-NOSVE-NEXT:    fcsel s3, s0, s2, ne352; NONEON-NOSVE-NEXT:    ldr s0, [sp, #24]353; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne354; NONEON-NOSVE-NEXT:    ldp s1, s2, [sp, #32]355; NONEON-NOSVE-NEXT:    stp s0, s3, [sp, #72]356; NONEON-NOSVE-NEXT:    ldr s0, [sp, #20]357; NONEON-NOSVE-NEXT:    fcsel s3, s0, s2, ne358; NONEON-NOSVE-NEXT:    ldr s0, [sp, #16]359; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne360; NONEON-NOSVE-NEXT:    ldp s1, s2, [sp, #56]361; NONEON-NOSVE-NEXT:    stp s0, s3, [sp, #64]362; NONEON-NOSVE-NEXT:    ldr s0, [sp, #12]363; NONEON-NOSVE-NEXT:    fcsel s3, s0, s2, ne364; NONEON-NOSVE-NEXT:    ldr s0, [sp, #8]365; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne366; NONEON-NOSVE-NEXT:    ldp s1, s2, [sp, #48]367; NONEON-NOSVE-NEXT:    stp s0, s3, [sp, #88]368; NONEON-NOSVE-NEXT:    ldr s0, [sp, #4]369; NONEON-NOSVE-NEXT:    fcsel s3, s0, s2, ne370; NONEON-NOSVE-NEXT:    ldr s0, [sp]371; NONEON-NOSVE-NEXT:    fcsel s0, s0, s1, ne372; NONEON-NOSVE-NEXT:    stp s0, s3, [sp, #80]373; NONEON-NOSVE-NEXT:    ldp q1, q0, [sp, #64]374; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]375; NONEON-NOSVE-NEXT:    add sp, sp, #96376; NONEON-NOSVE-NEXT:    ret377  %op1 = load volatile <8 x float>, ptr %a378  %op2 = load volatile <8 x float>, ptr %b379  %sel = select i1 %mask, <8 x float> %op1, <8 x float> %op2380  store <8 x float> %sel, ptr %a381  ret void382}383 384define <1 x double> @select_v1f64(<1 x double> %op1, <1 x double> %op2, i1 %mask) {385; CHECK-LABEL: select_v1f64:386; CHECK:       // %bb.0:387; CHECK-NEXT:    tst w0, #0x1388; CHECK-NEXT:    fcsel d0, d0, d1, ne389; CHECK-NEXT:    ret390;391; NONEON-NOSVE-LABEL: select_v1f64:392; NONEON-NOSVE:       // %bb.0:393; NONEON-NOSVE-NEXT:    sub sp, sp, #16394; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 16395; NONEON-NOSVE-NEXT:    tst w0, #0x1396; NONEON-NOSVE-NEXT:    fcsel d0, d0, d1, ne397; NONEON-NOSVE-NEXT:    str d0, [sp, #8]398; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]399; NONEON-NOSVE-NEXT:    add sp, sp, #16400; NONEON-NOSVE-NEXT:    ret401  %sel = select i1 %mask, <1 x double> %op1, <1 x double> %op2402  ret <1 x double> %sel403}404 405define <2 x double> @select_v2f64(<2 x double> %op1, <2 x double> %op2, i1 %mask) {406; CHECK-LABEL: select_v2f64:407; CHECK:       // %bb.0:408; CHECK-NEXT:    // kill: def $w0 killed $w0 def $x0409; CHECK-NEXT:    and x8, x0, #0x1410; CHECK-NEXT:    ptrue p0.d411; CHECK-NEXT:    // kill: def $q0 killed $q0 def $z0412; CHECK-NEXT:    // kill: def $q1 killed $q1 def $z1413; CHECK-NEXT:    mov z2.d, x8414; CHECK-NEXT:    cmpne p0.d, p0/z, z2.d, #0415; CHECK-NEXT:    sel z0.d, p0, z0.d, z1.d416; CHECK-NEXT:    // kill: def $q0 killed $q0 killed $z0417; CHECK-NEXT:    ret418;419; NONEON-NOSVE-LABEL: select_v2f64:420; NONEON-NOSVE:       // %bb.0:421; NONEON-NOSVE-NEXT:    stp q0, q1, [sp, #-48]!422; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 48423; NONEON-NOSVE-NEXT:    ldp d1, d2, [sp]424; NONEON-NOSVE-NEXT:    tst w0, #0x1425; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]426; NONEON-NOSVE-NEXT:    fcsel d3, d2, d0, ne427; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]428; NONEON-NOSVE-NEXT:    fcsel d0, d1, d0, ne429; NONEON-NOSVE-NEXT:    stp d0, d3, [sp, #32]430; NONEON-NOSVE-NEXT:    ldr q0, [sp, #32]431; NONEON-NOSVE-NEXT:    add sp, sp, #48432; NONEON-NOSVE-NEXT:    ret433  %sel = select i1 %mask, <2 x double> %op1, <2 x double> %op2434  ret <2 x double> %sel435}436 437define void @select_v4f64(ptr %a, ptr %b, i1 %mask) {438; CHECK-LABEL: select_v4f64:439; CHECK:       // %bb.0:440; CHECK-NEXT:    // kill: def $w2 killed $w2 def $x2441; CHECK-NEXT:    and x8, x2, #0x1442; CHECK-NEXT:    ptrue p0.d443; CHECK-NEXT:    mov z0.d, x8444; CHECK-NEXT:    cmpne p0.d, p0/z, z0.d, #0445; CHECK-NEXT:    ldr q0, [x0]446; CHECK-NEXT:    ldr q1, [x0, #16]447; CHECK-NEXT:    ldr q2, [x1]448; CHECK-NEXT:    ldr q3, [x1, #16]449; CHECK-NEXT:    sel z0.d, p0, z0.d, z2.d450; CHECK-NEXT:    sel z1.d, p0, z1.d, z3.d451; CHECK-NEXT:    stp q0, q1, [x0]452; CHECK-NEXT:    ret453;454; NONEON-NOSVE-LABEL: select_v4f64:455; NONEON-NOSVE:       // %bb.0:456; NONEON-NOSVE-NEXT:    sub sp, sp, #96457; NONEON-NOSVE-NEXT:    .cfi_def_cfa_offset 96458; NONEON-NOSVE-NEXT:    ldr q0, [x0]459; NONEON-NOSVE-NEXT:    ldr q1, [x0, #16]460; NONEON-NOSVE-NEXT:    tst w2, #0x1461; NONEON-NOSVE-NEXT:    ldr q2, [x1]462; NONEON-NOSVE-NEXT:    ldr q3, [x1, #16]463; NONEON-NOSVE-NEXT:    str q0, [sp]464; NONEON-NOSVE-NEXT:    stp q1, q3, [sp, #16]465; NONEON-NOSVE-NEXT:    str q2, [sp, #48]466; NONEON-NOSVE-NEXT:    ldp d1, d2, [sp, #32]467; NONEON-NOSVE-NEXT:    ldr d0, [sp, #24]468; NONEON-NOSVE-NEXT:    fcsel d3, d0, d2, ne469; NONEON-NOSVE-NEXT:    ldr d0, [sp, #16]470; NONEON-NOSVE-NEXT:    fcsel d0, d0, d1, ne471; NONEON-NOSVE-NEXT:    ldp d1, d2, [sp, #48]472; NONEON-NOSVE-NEXT:    stp d0, d3, [sp, #64]473; NONEON-NOSVE-NEXT:    ldr d0, [sp, #8]474; NONEON-NOSVE-NEXT:    fcsel d3, d0, d2, ne475; NONEON-NOSVE-NEXT:    ldr d0, [sp]476; NONEON-NOSVE-NEXT:    fcsel d0, d0, d1, ne477; NONEON-NOSVE-NEXT:    stp d0, d3, [sp, #80]478; NONEON-NOSVE-NEXT:    ldp q1, q0, [sp, #64]479; NONEON-NOSVE-NEXT:    stp q0, q1, [x0]480; NONEON-NOSVE-NEXT:    add sp, sp, #96481; NONEON-NOSVE-NEXT:    ret482  %op1 = load volatile <4 x double>, ptr %a483  %op2 = load volatile <4 x double>, ptr %b484  %sel = select i1 %mask, <4 x double> %op1, <4 x double> %op2485  store <4 x double> %sel, ptr %a486  ret void487}488