3155 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s --check-prefixes=CHECK,SVE3; RUN: llc -mattr=+sve2 -force-streaming-compatible < %s | FileCheck %s --check-prefixes=CHECK,SVE24; RUN: llc -mattr=+sme -force-streaming < %s | FileCheck %s --check-prefixes=CHECK,SVE25; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE6 7target triple = "aarch64-unknown-linux-gnu"8 9;10; ADD11;12define <4 x i8> @add_v4i8(<4 x i8> %op1, <4 x i8> %op2) {13; CHECK-LABEL: add_v4i8:14; CHECK: // %bb.0:15; CHECK-NEXT: // kill: def $d0 killed $d0 def $z016; CHECK-NEXT: // kill: def $d1 killed $d1 def $z117; CHECK-NEXT: add z0.h, z0.h, z1.h18; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z019; CHECK-NEXT: ret20;21; NONEON-NOSVE-LABEL: add_v4i8: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: ldrh w8, [sp, #22]27; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]28; NONEON-NOSVE-NEXT: add w8, w9, w829; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]30; NONEON-NOSVE-NEXT: strh w8, [sp, #30]31; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]32; NONEON-NOSVE-NEXT: add w8, w9, w833; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]34; NONEON-NOSVE-NEXT: strh w8, [sp, #28]35; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]36; NONEON-NOSVE-NEXT: add w8, w9, w837; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]38; NONEON-NOSVE-NEXT: strh w8, [sp, #26]39; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]40; NONEON-NOSVE-NEXT: add w8, w9, w841; NONEON-NOSVE-NEXT: strh w8, [sp, #24]42; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]43; NONEON-NOSVE-NEXT: add sp, sp, #3244; NONEON-NOSVE-NEXT: ret45 %res = add <4 x i8> %op1, %op246 ret <4 x i8> %res47}48 49define <8 x i8> @add_v8i8(<8 x i8> %op1, <8 x i8> %op2) {50; CHECK-LABEL: add_v8i8:51; CHECK: // %bb.0:52; CHECK-NEXT: // kill: def $d0 killed $d0 def $z053; CHECK-NEXT: // kill: def $d1 killed $d1 def $z154; CHECK-NEXT: add z0.b, z0.b, z1.b55; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z056; CHECK-NEXT: ret57;58; NONEON-NOSVE-LABEL: add_v8i8:59; NONEON-NOSVE: // %bb.0:60; NONEON-NOSVE-NEXT: sub sp, sp, #3261; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 3262; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]63; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]64; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]65; NONEON-NOSVE-NEXT: add w8, w9, w866; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]67; NONEON-NOSVE-NEXT: strb w8, [sp, #31]68; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]69; NONEON-NOSVE-NEXT: add w8, w9, w870; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]71; NONEON-NOSVE-NEXT: strb w8, [sp, #30]72; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]73; NONEON-NOSVE-NEXT: add w8, w9, w874; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]75; NONEON-NOSVE-NEXT: strb w8, [sp, #29]76; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]77; NONEON-NOSVE-NEXT: add w8, w9, w878; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]79; NONEON-NOSVE-NEXT: strb w8, [sp, #28]80; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]81; NONEON-NOSVE-NEXT: add w8, w9, w882; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]83; NONEON-NOSVE-NEXT: strb w8, [sp, #27]84; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]85; NONEON-NOSVE-NEXT: add w8, w9, w886; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]87; NONEON-NOSVE-NEXT: strb w8, [sp, #26]88; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]89; NONEON-NOSVE-NEXT: add w8, w9, w890; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]91; NONEON-NOSVE-NEXT: strb w8, [sp, #25]92; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]93; NONEON-NOSVE-NEXT: add w8, w9, w894; NONEON-NOSVE-NEXT: strb w8, [sp, #24]95; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]96; NONEON-NOSVE-NEXT: add sp, sp, #3297; NONEON-NOSVE-NEXT: ret98 %res = add <8 x i8> %op1, %op299 ret <8 x i8> %res100}101 102define <16 x i8> @add_v16i8(<16 x i8> %op1, <16 x i8> %op2) {103; CHECK-LABEL: add_v16i8:104; CHECK: // %bb.0:105; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0106; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1107; CHECK-NEXT: add z0.b, z0.b, z1.b108; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0109; CHECK-NEXT: ret110;111; NONEON-NOSVE-LABEL: add_v16i8:112; NONEON-NOSVE: // %bb.0:113; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!114; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48115; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]116; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]117; NONEON-NOSVE-NEXT: add w8, w9, w8118; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]119; NONEON-NOSVE-NEXT: strb w8, [sp, #47]120; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]121; NONEON-NOSVE-NEXT: add w8, w9, w8122; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]123; NONEON-NOSVE-NEXT: strb w8, [sp, #46]124; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]125; NONEON-NOSVE-NEXT: add w8, w9, w8126; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]127; NONEON-NOSVE-NEXT: strb w8, [sp, #45]128; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]129; NONEON-NOSVE-NEXT: add w8, w9, w8130; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]131; NONEON-NOSVE-NEXT: strb w8, [sp, #44]132; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]133; NONEON-NOSVE-NEXT: add w8, w9, w8134; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]135; NONEON-NOSVE-NEXT: strb w8, [sp, #43]136; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]137; NONEON-NOSVE-NEXT: add w8, w9, w8138; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]139; NONEON-NOSVE-NEXT: strb w8, [sp, #42]140; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]141; NONEON-NOSVE-NEXT: add w8, w9, w8142; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]143; NONEON-NOSVE-NEXT: strb w8, [sp, #41]144; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]145; NONEON-NOSVE-NEXT: add w8, w9, w8146; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]147; NONEON-NOSVE-NEXT: strb w8, [sp, #40]148; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]149; NONEON-NOSVE-NEXT: add w8, w9, w8150; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]151; NONEON-NOSVE-NEXT: strb w8, [sp, #39]152; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]153; NONEON-NOSVE-NEXT: add w8, w9, w8154; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]155; NONEON-NOSVE-NEXT: strb w8, [sp, #38]156; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]157; NONEON-NOSVE-NEXT: add w8, w9, w8158; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]159; NONEON-NOSVE-NEXT: strb w8, [sp, #37]160; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]161; NONEON-NOSVE-NEXT: add w8, w9, w8162; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]163; NONEON-NOSVE-NEXT: strb w8, [sp, #36]164; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]165; NONEON-NOSVE-NEXT: add w8, w9, w8166; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]167; NONEON-NOSVE-NEXT: strb w8, [sp, #35]168; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]169; NONEON-NOSVE-NEXT: add w8, w9, w8170; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]171; NONEON-NOSVE-NEXT: strb w8, [sp, #34]172; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]173; NONEON-NOSVE-NEXT: add w8, w9, w8174; NONEON-NOSVE-NEXT: ldrb w9, [sp]175; NONEON-NOSVE-NEXT: strb w8, [sp, #33]176; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]177; NONEON-NOSVE-NEXT: add w8, w9, w8178; NONEON-NOSVE-NEXT: strb w8, [sp, #32]179; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]180; NONEON-NOSVE-NEXT: add sp, sp, #48181; NONEON-NOSVE-NEXT: ret182 %res = add <16 x i8> %op1, %op2183 ret <16 x i8> %res184}185 186define void @add_v32i8(ptr %a, ptr %b) {187; CHECK-LABEL: add_v32i8:188; CHECK: // %bb.0:189; CHECK-NEXT: ldp q0, q3, [x1]190; CHECK-NEXT: ldp q1, q2, [x0]191; CHECK-NEXT: add z0.b, z1.b, z0.b192; CHECK-NEXT: add z1.b, z2.b, z3.b193; CHECK-NEXT: stp q0, q1, [x0]194; CHECK-NEXT: ret195;196; NONEON-NOSVE-LABEL: add_v32i8:197; NONEON-NOSVE: // %bb.0:198; NONEON-NOSVE-NEXT: sub sp, sp, #96199; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96200; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]201; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]202; NONEON-NOSVE-NEXT: stp q2, q3, [sp]203; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]204; NONEON-NOSVE-NEXT: ldrb w8, [sp, #63]205; NONEON-NOSVE-NEXT: ldrb w9, [sp, #47]206; NONEON-NOSVE-NEXT: add w8, w9, w8207; NONEON-NOSVE-NEXT: ldrb w9, [sp, #46]208; NONEON-NOSVE-NEXT: strb w8, [sp, #95]209; NONEON-NOSVE-NEXT: ldrb w8, [sp, #62]210; NONEON-NOSVE-NEXT: add w8, w9, w8211; NONEON-NOSVE-NEXT: ldrb w9, [sp, #45]212; NONEON-NOSVE-NEXT: strb w8, [sp, #94]213; NONEON-NOSVE-NEXT: ldrb w8, [sp, #61]214; NONEON-NOSVE-NEXT: add w8, w9, w8215; NONEON-NOSVE-NEXT: ldrb w9, [sp, #44]216; NONEON-NOSVE-NEXT: strb w8, [sp, #93]217; NONEON-NOSVE-NEXT: ldrb w8, [sp, #60]218; NONEON-NOSVE-NEXT: add w8, w9, w8219; NONEON-NOSVE-NEXT: ldrb w9, [sp, #43]220; NONEON-NOSVE-NEXT: strb w8, [sp, #92]221; NONEON-NOSVE-NEXT: ldrb w8, [sp, #59]222; NONEON-NOSVE-NEXT: add w8, w9, w8223; NONEON-NOSVE-NEXT: ldrb w9, [sp, #42]224; NONEON-NOSVE-NEXT: strb w8, [sp, #91]225; NONEON-NOSVE-NEXT: ldrb w8, [sp, #58]226; NONEON-NOSVE-NEXT: add w8, w9, w8227; NONEON-NOSVE-NEXT: ldrb w9, [sp, #41]228; NONEON-NOSVE-NEXT: strb w8, [sp, #90]229; NONEON-NOSVE-NEXT: ldrb w8, [sp, #57]230; NONEON-NOSVE-NEXT: add w8, w9, w8231; NONEON-NOSVE-NEXT: ldrb w9, [sp, #40]232; NONEON-NOSVE-NEXT: strb w8, [sp, #89]233; NONEON-NOSVE-NEXT: ldrb w8, [sp, #56]234; NONEON-NOSVE-NEXT: add w8, w9, w8235; NONEON-NOSVE-NEXT: ldrb w9, [sp, #39]236; NONEON-NOSVE-NEXT: strb w8, [sp, #88]237; NONEON-NOSVE-NEXT: ldrb w8, [sp, #55]238; NONEON-NOSVE-NEXT: add w8, w9, w8239; NONEON-NOSVE-NEXT: ldrb w9, [sp, #38]240; NONEON-NOSVE-NEXT: strb w8, [sp, #87]241; NONEON-NOSVE-NEXT: ldrb w8, [sp, #54]242; NONEON-NOSVE-NEXT: add w8, w9, w8243; NONEON-NOSVE-NEXT: ldrb w9, [sp, #37]244; NONEON-NOSVE-NEXT: strb w8, [sp, #86]245; NONEON-NOSVE-NEXT: ldrb w8, [sp, #53]246; NONEON-NOSVE-NEXT: add w8, w9, w8247; NONEON-NOSVE-NEXT: ldrb w9, [sp, #36]248; NONEON-NOSVE-NEXT: strb w8, [sp, #85]249; NONEON-NOSVE-NEXT: ldrb w8, [sp, #52]250; NONEON-NOSVE-NEXT: add w8, w9, w8251; NONEON-NOSVE-NEXT: ldrb w9, [sp, #35]252; NONEON-NOSVE-NEXT: strb w8, [sp, #84]253; NONEON-NOSVE-NEXT: ldrb w8, [sp, #51]254; NONEON-NOSVE-NEXT: add w8, w9, w8255; NONEON-NOSVE-NEXT: ldrb w9, [sp, #34]256; NONEON-NOSVE-NEXT: strb w8, [sp, #83]257; NONEON-NOSVE-NEXT: ldrb w8, [sp, #50]258; NONEON-NOSVE-NEXT: add w8, w9, w8259; NONEON-NOSVE-NEXT: ldrb w9, [sp, #33]260; NONEON-NOSVE-NEXT: strb w8, [sp, #82]261; NONEON-NOSVE-NEXT: ldrb w8, [sp, #49]262; NONEON-NOSVE-NEXT: add w8, w9, w8263; NONEON-NOSVE-NEXT: ldrb w9, [sp, #32]264; NONEON-NOSVE-NEXT: strb w8, [sp, #81]265; NONEON-NOSVE-NEXT: ldrb w8, [sp, #48]266; NONEON-NOSVE-NEXT: add w8, w9, w8267; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]268; NONEON-NOSVE-NEXT: strb w8, [sp, #80]269; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]270; NONEON-NOSVE-NEXT: add w8, w9, w8271; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]272; NONEON-NOSVE-NEXT: strb w8, [sp, #79]273; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]274; NONEON-NOSVE-NEXT: add w8, w9, w8275; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]276; NONEON-NOSVE-NEXT: strb w8, [sp, #78]277; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]278; NONEON-NOSVE-NEXT: add w8, w9, w8279; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]280; NONEON-NOSVE-NEXT: strb w8, [sp, #77]281; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]282; NONEON-NOSVE-NEXT: add w8, w9, w8283; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]284; NONEON-NOSVE-NEXT: strb w8, [sp, #76]285; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]286; NONEON-NOSVE-NEXT: add w8, w9, w8287; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]288; NONEON-NOSVE-NEXT: strb w8, [sp, #75]289; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]290; NONEON-NOSVE-NEXT: add w8, w9, w8291; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]292; NONEON-NOSVE-NEXT: strb w8, [sp, #74]293; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]294; NONEON-NOSVE-NEXT: add w8, w9, w8295; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]296; NONEON-NOSVE-NEXT: strb w8, [sp, #73]297; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]298; NONEON-NOSVE-NEXT: add w8, w9, w8299; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]300; NONEON-NOSVE-NEXT: strb w8, [sp, #72]301; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]302; NONEON-NOSVE-NEXT: add w8, w9, w8303; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]304; NONEON-NOSVE-NEXT: strb w8, [sp, #71]305; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]306; NONEON-NOSVE-NEXT: add w8, w9, w8307; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]308; NONEON-NOSVE-NEXT: strb w8, [sp, #70]309; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]310; NONEON-NOSVE-NEXT: add w8, w9, w8311; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]312; NONEON-NOSVE-NEXT: strb w8, [sp, #69]313; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]314; NONEON-NOSVE-NEXT: add w8, w9, w8315; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]316; NONEON-NOSVE-NEXT: strb w8, [sp, #68]317; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]318; NONEON-NOSVE-NEXT: add w8, w9, w8319; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]320; NONEON-NOSVE-NEXT: strb w8, [sp, #67]321; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]322; NONEON-NOSVE-NEXT: add w8, w9, w8323; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]324; NONEON-NOSVE-NEXT: strb w8, [sp, #66]325; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]326; NONEON-NOSVE-NEXT: add w8, w9, w8327; NONEON-NOSVE-NEXT: ldrb w9, [sp]328; NONEON-NOSVE-NEXT: strb w8, [sp, #65]329; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]330; NONEON-NOSVE-NEXT: add w8, w9, w8331; NONEON-NOSVE-NEXT: strb w8, [sp, #64]332; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]333; NONEON-NOSVE-NEXT: stp q0, q1, [x0]334; NONEON-NOSVE-NEXT: add sp, sp, #96335; NONEON-NOSVE-NEXT: ret336 %op1 = load <32 x i8>, ptr %a337 %op2 = load <32 x i8>, ptr %b338 %res = add <32 x i8> %op1, %op2339 store <32 x i8> %res, ptr %a340 ret void341}342 343define <2 x i16> @add_v2i16(<2 x i16> %op1, <2 x i16> %op2) {344; CHECK-LABEL: add_v2i16:345; CHECK: // %bb.0:346; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0347; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1348; CHECK-NEXT: add z0.s, z0.s, z1.s349; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0350; CHECK-NEXT: ret351;352; NONEON-NOSVE-LABEL: add_v2i16:353; NONEON-NOSVE: // %bb.0:354; NONEON-NOSVE-NEXT: sub sp, sp, #32355; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32356; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]357; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]358; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]359; NONEON-NOSVE-NEXT: add w8, w10, w8360; NONEON-NOSVE-NEXT: str w8, [sp, #28]361; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]362; NONEON-NOSVE-NEXT: add w8, w9, w8363; NONEON-NOSVE-NEXT: str w8, [sp, #24]364; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]365; NONEON-NOSVE-NEXT: add sp, sp, #32366; NONEON-NOSVE-NEXT: ret367 %res = add <2 x i16> %op1, %op2368 ret <2 x i16> %res369}370 371define <4 x i16> @add_v4i16(<4 x i16> %op1, <4 x i16> %op2) {372; CHECK-LABEL: add_v4i16:373; CHECK: // %bb.0:374; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0375; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1376; CHECK-NEXT: add z0.h, z0.h, z1.h377; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0378; CHECK-NEXT: ret379;380; NONEON-NOSVE-LABEL: add_v4i16:381; NONEON-NOSVE: // %bb.0:382; NONEON-NOSVE-NEXT: sub sp, sp, #32383; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32384; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]385; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]386; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]387; NONEON-NOSVE-NEXT: add w8, w9, w8388; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]389; NONEON-NOSVE-NEXT: strh w8, [sp, #30]390; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]391; NONEON-NOSVE-NEXT: add w8, w9, w8392; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]393; NONEON-NOSVE-NEXT: strh w8, [sp, #28]394; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]395; NONEON-NOSVE-NEXT: add w8, w9, w8396; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]397; NONEON-NOSVE-NEXT: strh w8, [sp, #26]398; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]399; NONEON-NOSVE-NEXT: add w8, w9, w8400; NONEON-NOSVE-NEXT: strh w8, [sp, #24]401; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]402; NONEON-NOSVE-NEXT: add sp, sp, #32403; NONEON-NOSVE-NEXT: ret404 %res = add <4 x i16> %op1, %op2405 ret <4 x i16> %res406}407 408define <8 x i16> @add_v8i16(<8 x i16> %op1, <8 x i16> %op2) {409; CHECK-LABEL: add_v8i16:410; CHECK: // %bb.0:411; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0412; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1413; CHECK-NEXT: add z0.h, z0.h, z1.h414; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0415; CHECK-NEXT: ret416;417; NONEON-NOSVE-LABEL: add_v8i16:418; NONEON-NOSVE: // %bb.0:419; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!420; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48421; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]422; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]423; NONEON-NOSVE-NEXT: add w8, w9, w8424; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]425; NONEON-NOSVE-NEXT: strh w8, [sp, #46]426; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]427; NONEON-NOSVE-NEXT: add w8, w9, w8428; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]429; NONEON-NOSVE-NEXT: strh w8, [sp, #44]430; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]431; NONEON-NOSVE-NEXT: add w8, w9, w8432; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]433; NONEON-NOSVE-NEXT: strh w8, [sp, #42]434; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]435; NONEON-NOSVE-NEXT: add w8, w9, w8436; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]437; NONEON-NOSVE-NEXT: strh w8, [sp, #40]438; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]439; NONEON-NOSVE-NEXT: add w8, w9, w8440; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]441; NONEON-NOSVE-NEXT: strh w8, [sp, #38]442; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]443; NONEON-NOSVE-NEXT: add w8, w9, w8444; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]445; NONEON-NOSVE-NEXT: strh w8, [sp, #36]446; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]447; NONEON-NOSVE-NEXT: add w8, w9, w8448; NONEON-NOSVE-NEXT: ldrh w9, [sp]449; NONEON-NOSVE-NEXT: strh w8, [sp, #34]450; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]451; NONEON-NOSVE-NEXT: add w8, w9, w8452; NONEON-NOSVE-NEXT: strh w8, [sp, #32]453; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]454; NONEON-NOSVE-NEXT: add sp, sp, #48455; NONEON-NOSVE-NEXT: ret456 %res = add <8 x i16> %op1, %op2457 ret <8 x i16> %res458}459 460define void @add_v16i16(ptr %a, ptr %b) {461; CHECK-LABEL: add_v16i16:462; CHECK: // %bb.0:463; CHECK-NEXT: ldp q0, q3, [x1]464; CHECK-NEXT: ldp q1, q2, [x0]465; CHECK-NEXT: add z0.h, z1.h, z0.h466; CHECK-NEXT: add z1.h, z2.h, z3.h467; CHECK-NEXT: stp q0, q1, [x0]468; CHECK-NEXT: ret469;470; NONEON-NOSVE-LABEL: add_v16i16:471; NONEON-NOSVE: // %bb.0:472; NONEON-NOSVE-NEXT: sub sp, sp, #96473; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96474; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]475; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]476; NONEON-NOSVE-NEXT: stp q2, q3, [sp]477; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]478; NONEON-NOSVE-NEXT: ldrh w8, [sp, #62]479; NONEON-NOSVE-NEXT: ldrh w9, [sp, #46]480; NONEON-NOSVE-NEXT: add w8, w9, w8481; NONEON-NOSVE-NEXT: ldrh w9, [sp, #44]482; NONEON-NOSVE-NEXT: strh w8, [sp, #94]483; NONEON-NOSVE-NEXT: ldrh w8, [sp, #60]484; NONEON-NOSVE-NEXT: add w8, w9, w8485; NONEON-NOSVE-NEXT: ldrh w9, [sp, #42]486; NONEON-NOSVE-NEXT: strh w8, [sp, #92]487; NONEON-NOSVE-NEXT: ldrh w8, [sp, #58]488; NONEON-NOSVE-NEXT: add w8, w9, w8489; NONEON-NOSVE-NEXT: ldrh w9, [sp, #40]490; NONEON-NOSVE-NEXT: strh w8, [sp, #90]491; NONEON-NOSVE-NEXT: ldrh w8, [sp, #56]492; NONEON-NOSVE-NEXT: add w8, w9, w8493; NONEON-NOSVE-NEXT: ldrh w9, [sp, #38]494; NONEON-NOSVE-NEXT: strh w8, [sp, #88]495; NONEON-NOSVE-NEXT: ldrh w8, [sp, #54]496; NONEON-NOSVE-NEXT: add w8, w9, w8497; NONEON-NOSVE-NEXT: ldrh w9, [sp, #36]498; NONEON-NOSVE-NEXT: strh w8, [sp, #86]499; NONEON-NOSVE-NEXT: ldrh w8, [sp, #52]500; NONEON-NOSVE-NEXT: add w8, w9, w8501; NONEON-NOSVE-NEXT: ldrh w9, [sp, #34]502; NONEON-NOSVE-NEXT: strh w8, [sp, #84]503; NONEON-NOSVE-NEXT: ldrh w8, [sp, #50]504; NONEON-NOSVE-NEXT: add w8, w9, w8505; NONEON-NOSVE-NEXT: ldrh w9, [sp, #32]506; NONEON-NOSVE-NEXT: strh w8, [sp, #82]507; NONEON-NOSVE-NEXT: ldrh w8, [sp, #48]508; NONEON-NOSVE-NEXT: add w8, w9, w8509; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]510; NONEON-NOSVE-NEXT: strh w8, [sp, #80]511; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]512; NONEON-NOSVE-NEXT: add w8, w9, w8513; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]514; NONEON-NOSVE-NEXT: strh w8, [sp, #78]515; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]516; NONEON-NOSVE-NEXT: add w8, w9, w8517; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]518; NONEON-NOSVE-NEXT: strh w8, [sp, #76]519; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]520; NONEON-NOSVE-NEXT: add w8, w9, w8521; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]522; NONEON-NOSVE-NEXT: strh w8, [sp, #74]523; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]524; NONEON-NOSVE-NEXT: add w8, w9, w8525; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]526; NONEON-NOSVE-NEXT: strh w8, [sp, #72]527; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]528; NONEON-NOSVE-NEXT: add w8, w9, w8529; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]530; NONEON-NOSVE-NEXT: strh w8, [sp, #70]531; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]532; NONEON-NOSVE-NEXT: add w8, w9, w8533; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]534; NONEON-NOSVE-NEXT: strh w8, [sp, #68]535; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]536; NONEON-NOSVE-NEXT: add w8, w9, w8537; NONEON-NOSVE-NEXT: ldrh w9, [sp]538; NONEON-NOSVE-NEXT: strh w8, [sp, #66]539; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]540; NONEON-NOSVE-NEXT: add w8, w9, w8541; NONEON-NOSVE-NEXT: strh w8, [sp, #64]542; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]543; NONEON-NOSVE-NEXT: stp q0, q1, [x0]544; NONEON-NOSVE-NEXT: add sp, sp, #96545; NONEON-NOSVE-NEXT: ret546 %op1 = load <16 x i16>, ptr %a547 %op2 = load <16 x i16>, ptr %b548 %res = add <16 x i16> %op1, %op2549 store <16 x i16> %res, ptr %a550 ret void551}552 553define <2 x i32> @add_v2i32(<2 x i32> %op1, <2 x i32> %op2) {554; CHECK-LABEL: add_v2i32:555; CHECK: // %bb.0:556; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0557; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1558; CHECK-NEXT: add z0.s, z0.s, z1.s559; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0560; CHECK-NEXT: ret561;562; NONEON-NOSVE-LABEL: add_v2i32:563; NONEON-NOSVE: // %bb.0:564; NONEON-NOSVE-NEXT: sub sp, sp, #32565; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32566; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]567; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]568; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]569; NONEON-NOSVE-NEXT: add w8, w10, w8570; NONEON-NOSVE-NEXT: str w8, [sp, #28]571; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]572; NONEON-NOSVE-NEXT: add w8, w9, w8573; NONEON-NOSVE-NEXT: str w8, [sp, #24]574; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]575; NONEON-NOSVE-NEXT: add sp, sp, #32576; NONEON-NOSVE-NEXT: ret577 %res = add <2 x i32> %op1, %op2578 ret <2 x i32> %res579}580 581define <4 x i32> @add_v4i32(<4 x i32> %op1, <4 x i32> %op2) {582; CHECK-LABEL: add_v4i32:583; CHECK: // %bb.0:584; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0585; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1586; CHECK-NEXT: add z0.s, z0.s, z1.s587; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0588; CHECK-NEXT: ret589;590; NONEON-NOSVE-LABEL: add_v4i32:591; NONEON-NOSVE: // %bb.0:592; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!593; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48594; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]595; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]596; NONEON-NOSVE-NEXT: add w8, w10, w8597; NONEON-NOSVE-NEXT: str w8, [sp, #44]598; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]599; NONEON-NOSVE-NEXT: add w8, w9, w8600; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]601; NONEON-NOSVE-NEXT: str w8, [sp, #40]602; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]603; NONEON-NOSVE-NEXT: add w8, w10, w8604; NONEON-NOSVE-NEXT: str w8, [sp, #36]605; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]606; NONEON-NOSVE-NEXT: add w8, w9, w8607; NONEON-NOSVE-NEXT: str w8, [sp, #32]608; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]609; NONEON-NOSVE-NEXT: add sp, sp, #48610; NONEON-NOSVE-NEXT: ret611 %res = add <4 x i32> %op1, %op2612 ret <4 x i32> %res613}614 615define void @add_v8i32(ptr %a, ptr %b) {616; CHECK-LABEL: add_v8i32:617; CHECK: // %bb.0:618; CHECK-NEXT: ldp q0, q3, [x1]619; CHECK-NEXT: ldp q1, q2, [x0]620; CHECK-NEXT: add z0.s, z1.s, z0.s621; CHECK-NEXT: add z1.s, z2.s, z3.s622; CHECK-NEXT: stp q0, q1, [x0]623; CHECK-NEXT: ret624;625; NONEON-NOSVE-LABEL: add_v8i32:626; NONEON-NOSVE: // %bb.0:627; NONEON-NOSVE-NEXT: sub sp, sp, #96628; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96629; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]630; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]631; NONEON-NOSVE-NEXT: stp q2, q3, [sp]632; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]633; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #40]634; NONEON-NOSVE-NEXT: ldr w8, [sp, #60]635; NONEON-NOSVE-NEXT: add w8, w10, w8636; NONEON-NOSVE-NEXT: str w8, [sp, #92]637; NONEON-NOSVE-NEXT: ldr w8, [sp, #56]638; NONEON-NOSVE-NEXT: add w8, w9, w8639; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #32]640; NONEON-NOSVE-NEXT: str w8, [sp, #88]641; NONEON-NOSVE-NEXT: ldr w8, [sp, #52]642; NONEON-NOSVE-NEXT: add w8, w10, w8643; NONEON-NOSVE-NEXT: str w8, [sp, #84]644; NONEON-NOSVE-NEXT: ldr w8, [sp, #48]645; NONEON-NOSVE-NEXT: add w8, w9, w8646; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]647; NONEON-NOSVE-NEXT: str w8, [sp, #80]648; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]649; NONEON-NOSVE-NEXT: add w8, w10, w8650; NONEON-NOSVE-NEXT: str w8, [sp, #76]651; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]652; NONEON-NOSVE-NEXT: add w8, w9, w8653; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]654; NONEON-NOSVE-NEXT: str w8, [sp, #72]655; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]656; NONEON-NOSVE-NEXT: add w8, w10, w8657; NONEON-NOSVE-NEXT: str w8, [sp, #68]658; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]659; NONEON-NOSVE-NEXT: add w8, w9, w8660; NONEON-NOSVE-NEXT: str w8, [sp, #64]661; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]662; NONEON-NOSVE-NEXT: stp q0, q1, [x0]663; NONEON-NOSVE-NEXT: add sp, sp, #96664; NONEON-NOSVE-NEXT: ret665 %op1 = load <8 x i32>, ptr %a666 %op2 = load <8 x i32>, ptr %b667 %res = add <8 x i32> %op1, %op2668 store <8 x i32> %res, ptr %a669 ret void670}671 672define <1 x i64> @add_v1i64(<1 x i64> %op1, <1 x i64> %op2) {673; CHECK-LABEL: add_v1i64:674; CHECK: // %bb.0:675; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0676; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1677; CHECK-NEXT: add z0.d, z0.d, z1.d678; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0679; CHECK-NEXT: ret680;681; NONEON-NOSVE-LABEL: add_v1i64:682; NONEON-NOSVE: // %bb.0:683; NONEON-NOSVE-NEXT: sub sp, sp, #16684; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16685; NONEON-NOSVE-NEXT: fmov x8, d1686; NONEON-NOSVE-NEXT: fmov x9, d0687; NONEON-NOSVE-NEXT: add x8, x9, x8688; NONEON-NOSVE-NEXT: str x8, [sp, #8]689; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]690; NONEON-NOSVE-NEXT: add sp, sp, #16691; NONEON-NOSVE-NEXT: ret692 %res = add <1 x i64> %op1, %op2693 ret <1 x i64> %res694}695 696define <2 x i64> @add_v2i64(<2 x i64> %op1, <2 x i64> %op2) {697; CHECK-LABEL: add_v2i64:698; CHECK: // %bb.0:699; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0700; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1701; CHECK-NEXT: add z0.d, z0.d, z1.d702; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0703; CHECK-NEXT: ret704;705; NONEON-NOSVE-LABEL: add_v2i64:706; NONEON-NOSVE: // %bb.0:707; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!708; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48709; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]710; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]711; NONEON-NOSVE-NEXT: add x8, x10, x8712; NONEON-NOSVE-NEXT: str x8, [sp, #40]713; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]714; NONEON-NOSVE-NEXT: add x8, x9, x8715; NONEON-NOSVE-NEXT: str x8, [sp, #32]716; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]717; NONEON-NOSVE-NEXT: add sp, sp, #48718; NONEON-NOSVE-NEXT: ret719 %res = add <2 x i64> %op1, %op2720 ret <2 x i64> %res721}722 723define void @add_v4i64(ptr %a, ptr %b) {724; CHECK-LABEL: add_v4i64:725; CHECK: // %bb.0:726; CHECK-NEXT: ldp q0, q3, [x1]727; CHECK-NEXT: ldp q1, q2, [x0]728; CHECK-NEXT: add z0.d, z1.d, z0.d729; CHECK-NEXT: add z1.d, z2.d, z3.d730; CHECK-NEXT: stp q0, q1, [x0]731; CHECK-NEXT: ret732;733; NONEON-NOSVE-LABEL: add_v4i64:734; NONEON-NOSVE: // %bb.0:735; NONEON-NOSVE-NEXT: sub sp, sp, #96736; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96737; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]738; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]739; NONEON-NOSVE-NEXT: stp q2, q3, [sp]740; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]741; NONEON-NOSVE-NEXT: ldp x9, x10, [sp, #32]742; NONEON-NOSVE-NEXT: ldr x8, [sp, #56]743; NONEON-NOSVE-NEXT: add x8, x10, x8744; NONEON-NOSVE-NEXT: str x8, [sp, #88]745; NONEON-NOSVE-NEXT: ldr x8, [sp, #48]746; NONEON-NOSVE-NEXT: add x8, x9, x8747; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]748; NONEON-NOSVE-NEXT: str x8, [sp, #80]749; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]750; NONEON-NOSVE-NEXT: add x8, x10, x8751; NONEON-NOSVE-NEXT: str x8, [sp, #72]752; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]753; NONEON-NOSVE-NEXT: add x8, x9, x8754; NONEON-NOSVE-NEXT: str x8, [sp, #64]755; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]756; NONEON-NOSVE-NEXT: stp q0, q1, [x0]757; NONEON-NOSVE-NEXT: add sp, sp, #96758; NONEON-NOSVE-NEXT: ret759 %op1 = load <4 x i64>, ptr %a760 %op2 = load <4 x i64>, ptr %b761 %res = add <4 x i64> %op1, %op2762 store <4 x i64> %res, ptr %a763 ret void764}765 766;767; MUL768;769 770define <4 x i8> @mul_v4i8(<4 x i8> %op1, <4 x i8> %op2) {771; SVE-LABEL: mul_v4i8:772; SVE: // %bb.0:773; SVE-NEXT: ptrue p0.h, vl4774; SVE-NEXT: // kill: def $d0 killed $d0 def $z0775; SVE-NEXT: // kill: def $d1 killed $d1 def $z1776; SVE-NEXT: mul z0.h, p0/m, z0.h, z1.h777; SVE-NEXT: // kill: def $d0 killed $d0 killed $z0778; SVE-NEXT: ret779;780; SVE2-LABEL: mul_v4i8:781; SVE2: // %bb.0:782; SVE2-NEXT: // kill: def $d0 killed $d0 def $z0783; SVE2-NEXT: // kill: def $d1 killed $d1 def $z1784; SVE2-NEXT: mul z0.h, z0.h, z1.h785; SVE2-NEXT: // kill: def $d0 killed $d0 killed $z0786; SVE2-NEXT: ret787;788; NONEON-NOSVE-LABEL: mul_v4i8:789; NONEON-NOSVE: // %bb.0:790; NONEON-NOSVE-NEXT: sub sp, sp, #32791; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32792; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]793; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]794; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]795; NONEON-NOSVE-NEXT: mul w8, w9, w8796; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]797; NONEON-NOSVE-NEXT: strh w8, [sp, #30]798; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]799; NONEON-NOSVE-NEXT: mul w8, w9, w8800; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]801; NONEON-NOSVE-NEXT: strh w8, [sp, #28]802; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]803; NONEON-NOSVE-NEXT: mul w8, w9, w8804; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]805; NONEON-NOSVE-NEXT: strh w8, [sp, #26]806; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]807; NONEON-NOSVE-NEXT: mul w8, w9, w8808; NONEON-NOSVE-NEXT: strh w8, [sp, #24]809; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]810; NONEON-NOSVE-NEXT: add sp, sp, #32811; NONEON-NOSVE-NEXT: ret812 %res = mul <4 x i8> %op1, %op2813 ret <4 x i8> %res814}815 816define <8 x i8> @mul_v8i8(<8 x i8> %op1, <8 x i8> %op2) {817; SVE-LABEL: mul_v8i8:818; SVE: // %bb.0:819; SVE-NEXT: ptrue p0.b, vl8820; SVE-NEXT: // kill: def $d0 killed $d0 def $z0821; SVE-NEXT: // kill: def $d1 killed $d1 def $z1822; SVE-NEXT: mul z0.b, p0/m, z0.b, z1.b823; SVE-NEXT: // kill: def $d0 killed $d0 killed $z0824; SVE-NEXT: ret825;826; SVE2-LABEL: mul_v8i8:827; SVE2: // %bb.0:828; SVE2-NEXT: // kill: def $d0 killed $d0 def $z0829; SVE2-NEXT: // kill: def $d1 killed $d1 def $z1830; SVE2-NEXT: mul z0.b, z0.b, z1.b831; SVE2-NEXT: // kill: def $d0 killed $d0 killed $z0832; SVE2-NEXT: ret833;834; NONEON-NOSVE-LABEL: mul_v8i8:835; NONEON-NOSVE: // %bb.0:836; NONEON-NOSVE-NEXT: sub sp, sp, #32837; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32838; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]839; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]840; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]841; NONEON-NOSVE-NEXT: mul w8, w9, w8842; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]843; NONEON-NOSVE-NEXT: strb w8, [sp, #31]844; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]845; NONEON-NOSVE-NEXT: mul w8, w9, w8846; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]847; NONEON-NOSVE-NEXT: strb w8, [sp, #30]848; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]849; NONEON-NOSVE-NEXT: mul w8, w9, w8850; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]851; NONEON-NOSVE-NEXT: strb w8, [sp, #29]852; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]853; NONEON-NOSVE-NEXT: mul w8, w9, w8854; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]855; NONEON-NOSVE-NEXT: strb w8, [sp, #28]856; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]857; NONEON-NOSVE-NEXT: mul w8, w9, w8858; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]859; NONEON-NOSVE-NEXT: strb w8, [sp, #27]860; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]861; NONEON-NOSVE-NEXT: mul w8, w9, w8862; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]863; NONEON-NOSVE-NEXT: strb w8, [sp, #26]864; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]865; NONEON-NOSVE-NEXT: mul w8, w9, w8866; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]867; NONEON-NOSVE-NEXT: strb w8, [sp, #25]868; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]869; NONEON-NOSVE-NEXT: mul w8, w9, w8870; NONEON-NOSVE-NEXT: strb w8, [sp, #24]871; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]872; NONEON-NOSVE-NEXT: add sp, sp, #32873; NONEON-NOSVE-NEXT: ret874 %res = mul <8 x i8> %op1, %op2875 ret <8 x i8> %res876}877 878define <16 x i8> @mul_v16i8(<16 x i8> %op1, <16 x i8> %op2) {879; SVE-LABEL: mul_v16i8:880; SVE: // %bb.0:881; SVE-NEXT: ptrue p0.b, vl16882; SVE-NEXT: // kill: def $q0 killed $q0 def $z0883; SVE-NEXT: // kill: def $q1 killed $q1 def $z1884; SVE-NEXT: mul z0.b, p0/m, z0.b, z1.b885; SVE-NEXT: // kill: def $q0 killed $q0 killed $z0886; SVE-NEXT: ret887;888; SVE2-LABEL: mul_v16i8:889; SVE2: // %bb.0:890; SVE2-NEXT: // kill: def $q0 killed $q0 def $z0891; SVE2-NEXT: // kill: def $q1 killed $q1 def $z1892; SVE2-NEXT: mul z0.b, z0.b, z1.b893; SVE2-NEXT: // kill: def $q0 killed $q0 killed $z0894; SVE2-NEXT: ret895;896; NONEON-NOSVE-LABEL: mul_v16i8:897; NONEON-NOSVE: // %bb.0:898; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!899; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48900; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]901; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]902; NONEON-NOSVE-NEXT: mul w8, w9, w8903; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]904; NONEON-NOSVE-NEXT: strb w8, [sp, #47]905; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]906; NONEON-NOSVE-NEXT: mul w8, w9, w8907; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]908; NONEON-NOSVE-NEXT: strb w8, [sp, #46]909; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]910; NONEON-NOSVE-NEXT: mul w8, w9, w8911; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]912; NONEON-NOSVE-NEXT: strb w8, [sp, #45]913; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]914; NONEON-NOSVE-NEXT: mul w8, w9, w8915; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]916; NONEON-NOSVE-NEXT: strb w8, [sp, #44]917; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]918; NONEON-NOSVE-NEXT: mul w8, w9, w8919; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]920; NONEON-NOSVE-NEXT: strb w8, [sp, #43]921; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]922; NONEON-NOSVE-NEXT: mul w8, w9, w8923; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]924; NONEON-NOSVE-NEXT: strb w8, [sp, #42]925; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]926; NONEON-NOSVE-NEXT: mul w8, w9, w8927; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]928; NONEON-NOSVE-NEXT: strb w8, [sp, #41]929; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]930; NONEON-NOSVE-NEXT: mul w8, w9, w8931; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]932; NONEON-NOSVE-NEXT: strb w8, [sp, #40]933; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]934; NONEON-NOSVE-NEXT: mul w8, w9, w8935; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]936; NONEON-NOSVE-NEXT: strb w8, [sp, #39]937; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]938; NONEON-NOSVE-NEXT: mul w8, w9, w8939; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]940; NONEON-NOSVE-NEXT: strb w8, [sp, #38]941; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]942; NONEON-NOSVE-NEXT: mul w8, w9, w8943; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]944; NONEON-NOSVE-NEXT: strb w8, [sp, #37]945; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]946; NONEON-NOSVE-NEXT: mul w8, w9, w8947; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]948; NONEON-NOSVE-NEXT: strb w8, [sp, #36]949; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]950; NONEON-NOSVE-NEXT: mul w8, w9, w8951; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]952; NONEON-NOSVE-NEXT: strb w8, [sp, #35]953; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]954; NONEON-NOSVE-NEXT: mul w8, w9, w8955; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]956; NONEON-NOSVE-NEXT: strb w8, [sp, #34]957; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]958; NONEON-NOSVE-NEXT: mul w8, w9, w8959; NONEON-NOSVE-NEXT: ldrb w9, [sp]960; NONEON-NOSVE-NEXT: strb w8, [sp, #33]961; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]962; NONEON-NOSVE-NEXT: mul w8, w9, w8963; NONEON-NOSVE-NEXT: strb w8, [sp, #32]964; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]965; NONEON-NOSVE-NEXT: add sp, sp, #48966; NONEON-NOSVE-NEXT: ret967 %res = mul <16 x i8> %op1, %op2968 ret <16 x i8> %res969}970 971define void @mul_v32i8(ptr %a, ptr %b) {972; SVE-LABEL: mul_v32i8:973; SVE: // %bb.0:974; SVE-NEXT: ldp q0, q3, [x1]975; SVE-NEXT: ptrue p0.b, vl16976; SVE-NEXT: ldp q1, q2, [x0]977; SVE-NEXT: mul z0.b, p0/m, z0.b, z1.b978; SVE-NEXT: mul z2.b, p0/m, z2.b, z3.b979; SVE-NEXT: stp q0, q2, [x0]980; SVE-NEXT: ret981;982; SVE2-LABEL: mul_v32i8:983; SVE2: // %bb.0:984; SVE2-NEXT: ldp q0, q3, [x1]985; SVE2-NEXT: ldp q1, q2, [x0]986; SVE2-NEXT: mul z0.b, z1.b, z0.b987; SVE2-NEXT: mul z1.b, z2.b, z3.b988; SVE2-NEXT: stp q0, q1, [x0]989; SVE2-NEXT: ret990;991; NONEON-NOSVE-LABEL: mul_v32i8:992; NONEON-NOSVE: // %bb.0:993; NONEON-NOSVE-NEXT: sub sp, sp, #96994; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96995; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]996; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]997; NONEON-NOSVE-NEXT: stp q2, q3, [sp]998; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]999; NONEON-NOSVE-NEXT: ldrb w8, [sp, #63]1000; NONEON-NOSVE-NEXT: ldrb w9, [sp, #47]1001; NONEON-NOSVE-NEXT: mul w8, w9, w81002; NONEON-NOSVE-NEXT: ldrb w9, [sp, #46]1003; NONEON-NOSVE-NEXT: strb w8, [sp, #95]1004; NONEON-NOSVE-NEXT: ldrb w8, [sp, #62]1005; NONEON-NOSVE-NEXT: mul w8, w9, w81006; NONEON-NOSVE-NEXT: ldrb w9, [sp, #45]1007; NONEON-NOSVE-NEXT: strb w8, [sp, #94]1008; NONEON-NOSVE-NEXT: ldrb w8, [sp, #61]1009; NONEON-NOSVE-NEXT: mul w8, w9, w81010; NONEON-NOSVE-NEXT: ldrb w9, [sp, #44]1011; NONEON-NOSVE-NEXT: strb w8, [sp, #93]1012; NONEON-NOSVE-NEXT: ldrb w8, [sp, #60]1013; NONEON-NOSVE-NEXT: mul w8, w9, w81014; NONEON-NOSVE-NEXT: ldrb w9, [sp, #43]1015; NONEON-NOSVE-NEXT: strb w8, [sp, #92]1016; NONEON-NOSVE-NEXT: ldrb w8, [sp, #59]1017; NONEON-NOSVE-NEXT: mul w8, w9, w81018; NONEON-NOSVE-NEXT: ldrb w9, [sp, #42]1019; NONEON-NOSVE-NEXT: strb w8, [sp, #91]1020; NONEON-NOSVE-NEXT: ldrb w8, [sp, #58]1021; NONEON-NOSVE-NEXT: mul w8, w9, w81022; NONEON-NOSVE-NEXT: ldrb w9, [sp, #41]1023; NONEON-NOSVE-NEXT: strb w8, [sp, #90]1024; NONEON-NOSVE-NEXT: ldrb w8, [sp, #57]1025; NONEON-NOSVE-NEXT: mul w8, w9, w81026; NONEON-NOSVE-NEXT: ldrb w9, [sp, #40]1027; NONEON-NOSVE-NEXT: strb w8, [sp, #89]1028; NONEON-NOSVE-NEXT: ldrb w8, [sp, #56]1029; NONEON-NOSVE-NEXT: mul w8, w9, w81030; NONEON-NOSVE-NEXT: ldrb w9, [sp, #39]1031; NONEON-NOSVE-NEXT: strb w8, [sp, #88]1032; NONEON-NOSVE-NEXT: ldrb w8, [sp, #55]1033; NONEON-NOSVE-NEXT: mul w8, w9, w81034; NONEON-NOSVE-NEXT: ldrb w9, [sp, #38]1035; NONEON-NOSVE-NEXT: strb w8, [sp, #87]1036; NONEON-NOSVE-NEXT: ldrb w8, [sp, #54]1037; NONEON-NOSVE-NEXT: mul w8, w9, w81038; NONEON-NOSVE-NEXT: ldrb w9, [sp, #37]1039; NONEON-NOSVE-NEXT: strb w8, [sp, #86]1040; NONEON-NOSVE-NEXT: ldrb w8, [sp, #53]1041; NONEON-NOSVE-NEXT: mul w8, w9, w81042; NONEON-NOSVE-NEXT: ldrb w9, [sp, #36]1043; NONEON-NOSVE-NEXT: strb w8, [sp, #85]1044; NONEON-NOSVE-NEXT: ldrb w8, [sp, #52]1045; NONEON-NOSVE-NEXT: mul w8, w9, w81046; NONEON-NOSVE-NEXT: ldrb w9, [sp, #35]1047; NONEON-NOSVE-NEXT: strb w8, [sp, #84]1048; NONEON-NOSVE-NEXT: ldrb w8, [sp, #51]1049; NONEON-NOSVE-NEXT: mul w8, w9, w81050; NONEON-NOSVE-NEXT: ldrb w9, [sp, #34]1051; NONEON-NOSVE-NEXT: strb w8, [sp, #83]1052; NONEON-NOSVE-NEXT: ldrb w8, [sp, #50]1053; NONEON-NOSVE-NEXT: mul w8, w9, w81054; NONEON-NOSVE-NEXT: ldrb w9, [sp, #33]1055; NONEON-NOSVE-NEXT: strb w8, [sp, #82]1056; NONEON-NOSVE-NEXT: ldrb w8, [sp, #49]1057; NONEON-NOSVE-NEXT: mul w8, w9, w81058; NONEON-NOSVE-NEXT: ldrb w9, [sp, #32]1059; NONEON-NOSVE-NEXT: strb w8, [sp, #81]1060; NONEON-NOSVE-NEXT: ldrb w8, [sp, #48]1061; NONEON-NOSVE-NEXT: mul w8, w9, w81062; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]1063; NONEON-NOSVE-NEXT: strb w8, [sp, #80]1064; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]1065; NONEON-NOSVE-NEXT: mul w8, w9, w81066; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]1067; NONEON-NOSVE-NEXT: strb w8, [sp, #79]1068; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]1069; NONEON-NOSVE-NEXT: mul w8, w9, w81070; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]1071; NONEON-NOSVE-NEXT: strb w8, [sp, #78]1072; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]1073; NONEON-NOSVE-NEXT: mul w8, w9, w81074; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]1075; NONEON-NOSVE-NEXT: strb w8, [sp, #77]1076; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]1077; NONEON-NOSVE-NEXT: mul w8, w9, w81078; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]1079; NONEON-NOSVE-NEXT: strb w8, [sp, #76]1080; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]1081; NONEON-NOSVE-NEXT: mul w8, w9, w81082; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]1083; NONEON-NOSVE-NEXT: strb w8, [sp, #75]1084; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]1085; NONEON-NOSVE-NEXT: mul w8, w9, w81086; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]1087; NONEON-NOSVE-NEXT: strb w8, [sp, #74]1088; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]1089; NONEON-NOSVE-NEXT: mul w8, w9, w81090; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]1091; NONEON-NOSVE-NEXT: strb w8, [sp, #73]1092; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]1093; NONEON-NOSVE-NEXT: mul w8, w9, w81094; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]1095; NONEON-NOSVE-NEXT: strb w8, [sp, #72]1096; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]1097; NONEON-NOSVE-NEXT: mul w8, w9, w81098; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]1099; NONEON-NOSVE-NEXT: strb w8, [sp, #71]1100; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]1101; NONEON-NOSVE-NEXT: mul w8, w9, w81102; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]1103; NONEON-NOSVE-NEXT: strb w8, [sp, #70]1104; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]1105; NONEON-NOSVE-NEXT: mul w8, w9, w81106; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]1107; NONEON-NOSVE-NEXT: strb w8, [sp, #69]1108; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]1109; NONEON-NOSVE-NEXT: mul w8, w9, w81110; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]1111; NONEON-NOSVE-NEXT: strb w8, [sp, #68]1112; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]1113; NONEON-NOSVE-NEXT: mul w8, w9, w81114; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]1115; NONEON-NOSVE-NEXT: strb w8, [sp, #67]1116; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]1117; NONEON-NOSVE-NEXT: mul w8, w9, w81118; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]1119; NONEON-NOSVE-NEXT: strb w8, [sp, #66]1120; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]1121; NONEON-NOSVE-NEXT: mul w8, w9, w81122; NONEON-NOSVE-NEXT: ldrb w9, [sp]1123; NONEON-NOSVE-NEXT: strb w8, [sp, #65]1124; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]1125; NONEON-NOSVE-NEXT: mul w8, w9, w81126; NONEON-NOSVE-NEXT: strb w8, [sp, #64]1127; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]1128; NONEON-NOSVE-NEXT: stp q0, q1, [x0]1129; NONEON-NOSVE-NEXT: add sp, sp, #961130; NONEON-NOSVE-NEXT: ret1131 %op1 = load <32 x i8>, ptr %a1132 %op2 = load <32 x i8>, ptr %b1133 %res = mul <32 x i8> %op1, %op21134 store <32 x i8> %res, ptr %a1135 ret void1136}1137 1138define <2 x i16> @mul_v2i16(<2 x i16> %op1, <2 x i16> %op2) {1139; SVE-LABEL: mul_v2i16:1140; SVE: // %bb.0:1141; SVE-NEXT: ptrue p0.s, vl21142; SVE-NEXT: // kill: def $d0 killed $d0 def $z01143; SVE-NEXT: // kill: def $d1 killed $d1 def $z11144; SVE-NEXT: mul z0.s, p0/m, z0.s, z1.s1145; SVE-NEXT: // kill: def $d0 killed $d0 killed $z01146; SVE-NEXT: ret1147;1148; SVE2-LABEL: mul_v2i16:1149; SVE2: // %bb.0:1150; SVE2-NEXT: // kill: def $d0 killed $d0 def $z01151; SVE2-NEXT: // kill: def $d1 killed $d1 def $z11152; SVE2-NEXT: mul z0.s, z0.s, z1.s1153; SVE2-NEXT: // kill: def $d0 killed $d0 killed $z01154; SVE2-NEXT: ret1155;1156; NONEON-NOSVE-LABEL: mul_v2i16:1157; NONEON-NOSVE: // %bb.0:1158; NONEON-NOSVE-NEXT: sub sp, sp, #321159; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 321160; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]1161; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]1162; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]1163; NONEON-NOSVE-NEXT: mul w11, w10, w81164; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]1165; NONEON-NOSVE-NEXT: mul w8, w9, w81166; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #24]1167; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]1168; NONEON-NOSVE-NEXT: add sp, sp, #321169; NONEON-NOSVE-NEXT: ret1170 %res = mul <2 x i16> %op1, %op21171 ret <2 x i16> %res1172}1173 1174define <4 x i16> @mul_v4i16(<4 x i16> %op1, <4 x i16> %op2) {1175; SVE-LABEL: mul_v4i16:1176; SVE: // %bb.0:1177; SVE-NEXT: ptrue p0.h, vl41178; SVE-NEXT: // kill: def $d0 killed $d0 def $z01179; SVE-NEXT: // kill: def $d1 killed $d1 def $z11180; SVE-NEXT: mul z0.h, p0/m, z0.h, z1.h1181; SVE-NEXT: // kill: def $d0 killed $d0 killed $z01182; SVE-NEXT: ret1183;1184; SVE2-LABEL: mul_v4i16:1185; SVE2: // %bb.0:1186; SVE2-NEXT: // kill: def $d0 killed $d0 def $z01187; SVE2-NEXT: // kill: def $d1 killed $d1 def $z11188; SVE2-NEXT: mul z0.h, z0.h, z1.h1189; SVE2-NEXT: // kill: def $d0 killed $d0 killed $z01190; SVE2-NEXT: ret1191;1192; NONEON-NOSVE-LABEL: mul_v4i16:1193; NONEON-NOSVE: // %bb.0:1194; NONEON-NOSVE-NEXT: sub sp, sp, #321195; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 321196; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]1197; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]1198; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]1199; NONEON-NOSVE-NEXT: mul w8, w9, w81200; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]1201; NONEON-NOSVE-NEXT: strh w8, [sp, #30]1202; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]1203; NONEON-NOSVE-NEXT: mul w8, w9, w81204; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]1205; NONEON-NOSVE-NEXT: strh w8, [sp, #28]1206; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]1207; NONEON-NOSVE-NEXT: mul w8, w9, w81208; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]1209; NONEON-NOSVE-NEXT: strh w8, [sp, #26]1210; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]1211; NONEON-NOSVE-NEXT: mul w8, w9, w81212; NONEON-NOSVE-NEXT: strh w8, [sp, #24]1213; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]1214; NONEON-NOSVE-NEXT: add sp, sp, #321215; NONEON-NOSVE-NEXT: ret1216 %res = mul <4 x i16> %op1, %op21217 ret <4 x i16> %res1218}1219 1220define <8 x i16> @mul_v8i16(<8 x i16> %op1, <8 x i16> %op2) {1221; SVE-LABEL: mul_v8i16:1222; SVE: // %bb.0:1223; SVE-NEXT: ptrue p0.h, vl81224; SVE-NEXT: // kill: def $q0 killed $q0 def $z01225; SVE-NEXT: // kill: def $q1 killed $q1 def $z11226; SVE-NEXT: mul z0.h, p0/m, z0.h, z1.h1227; SVE-NEXT: // kill: def $q0 killed $q0 killed $z01228; SVE-NEXT: ret1229;1230; SVE2-LABEL: mul_v8i16:1231; SVE2: // %bb.0:1232; SVE2-NEXT: // kill: def $q0 killed $q0 def $z01233; SVE2-NEXT: // kill: def $q1 killed $q1 def $z11234; SVE2-NEXT: mul z0.h, z0.h, z1.h1235; SVE2-NEXT: // kill: def $q0 killed $q0 killed $z01236; SVE2-NEXT: ret1237;1238; NONEON-NOSVE-LABEL: mul_v8i16:1239; NONEON-NOSVE: // %bb.0:1240; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!1241; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 481242; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]1243; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]1244; NONEON-NOSVE-NEXT: mul w8, w9, w81245; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]1246; NONEON-NOSVE-NEXT: strh w8, [sp, #46]1247; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]1248; NONEON-NOSVE-NEXT: mul w8, w9, w81249; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]1250; NONEON-NOSVE-NEXT: strh w8, [sp, #44]1251; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]1252; NONEON-NOSVE-NEXT: mul w8, w9, w81253; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]1254; NONEON-NOSVE-NEXT: strh w8, [sp, #42]1255; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]1256; NONEON-NOSVE-NEXT: mul w8, w9, w81257; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]1258; NONEON-NOSVE-NEXT: strh w8, [sp, #40]1259; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]1260; NONEON-NOSVE-NEXT: mul w8, w9, w81261; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]1262; NONEON-NOSVE-NEXT: strh w8, [sp, #38]1263; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]1264; NONEON-NOSVE-NEXT: mul w8, w9, w81265; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]1266; NONEON-NOSVE-NEXT: strh w8, [sp, #36]1267; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]1268; NONEON-NOSVE-NEXT: mul w8, w9, w81269; NONEON-NOSVE-NEXT: ldrh w9, [sp]1270; NONEON-NOSVE-NEXT: strh w8, [sp, #34]1271; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]1272; NONEON-NOSVE-NEXT: mul w8, w9, w81273; NONEON-NOSVE-NEXT: strh w8, [sp, #32]1274; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]1275; NONEON-NOSVE-NEXT: add sp, sp, #481276; NONEON-NOSVE-NEXT: ret1277 %res = mul <8 x i16> %op1, %op21278 ret <8 x i16> %res1279}1280 1281define void @mul_v16i16(ptr %a, ptr %b) {1282; SVE-LABEL: mul_v16i16:1283; SVE: // %bb.0:1284; SVE-NEXT: ldp q0, q3, [x1]1285; SVE-NEXT: ptrue p0.h, vl81286; SVE-NEXT: ldp q1, q2, [x0]1287; SVE-NEXT: mul z0.h, p0/m, z0.h, z1.h1288; SVE-NEXT: mul z2.h, p0/m, z2.h, z3.h1289; SVE-NEXT: stp q0, q2, [x0]1290; SVE-NEXT: ret1291;1292; SVE2-LABEL: mul_v16i16:1293; SVE2: // %bb.0:1294; SVE2-NEXT: ldp q0, q3, [x1]1295; SVE2-NEXT: ldp q1, q2, [x0]1296; SVE2-NEXT: mul z0.h, z1.h, z0.h1297; SVE2-NEXT: mul z1.h, z2.h, z3.h1298; SVE2-NEXT: stp q0, q1, [x0]1299; SVE2-NEXT: ret1300;1301; NONEON-NOSVE-LABEL: mul_v16i16:1302; NONEON-NOSVE: // %bb.0:1303; NONEON-NOSVE-NEXT: sub sp, sp, #961304; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 961305; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]1306; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]1307; NONEON-NOSVE-NEXT: stp q2, q3, [sp]1308; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]1309; NONEON-NOSVE-NEXT: ldrh w8, [sp, #62]1310; NONEON-NOSVE-NEXT: ldrh w9, [sp, #46]1311; NONEON-NOSVE-NEXT: mul w8, w9, w81312; NONEON-NOSVE-NEXT: ldrh w9, [sp, #44]1313; NONEON-NOSVE-NEXT: strh w8, [sp, #94]1314; NONEON-NOSVE-NEXT: ldrh w8, [sp, #60]1315; NONEON-NOSVE-NEXT: mul w8, w9, w81316; NONEON-NOSVE-NEXT: ldrh w9, [sp, #42]1317; NONEON-NOSVE-NEXT: strh w8, [sp, #92]1318; NONEON-NOSVE-NEXT: ldrh w8, [sp, #58]1319; NONEON-NOSVE-NEXT: mul w8, w9, w81320; NONEON-NOSVE-NEXT: ldrh w9, [sp, #40]1321; NONEON-NOSVE-NEXT: strh w8, [sp, #90]1322; NONEON-NOSVE-NEXT: ldrh w8, [sp, #56]1323; NONEON-NOSVE-NEXT: mul w8, w9, w81324; NONEON-NOSVE-NEXT: ldrh w9, [sp, #38]1325; NONEON-NOSVE-NEXT: strh w8, [sp, #88]1326; NONEON-NOSVE-NEXT: ldrh w8, [sp, #54]1327; NONEON-NOSVE-NEXT: mul w8, w9, w81328; NONEON-NOSVE-NEXT: ldrh w9, [sp, #36]1329; NONEON-NOSVE-NEXT: strh w8, [sp, #86]1330; NONEON-NOSVE-NEXT: ldrh w8, [sp, #52]1331; NONEON-NOSVE-NEXT: mul w8, w9, w81332; NONEON-NOSVE-NEXT: ldrh w9, [sp, #34]1333; NONEON-NOSVE-NEXT: strh w8, [sp, #84]1334; NONEON-NOSVE-NEXT: ldrh w8, [sp, #50]1335; NONEON-NOSVE-NEXT: mul w8, w9, w81336; NONEON-NOSVE-NEXT: ldrh w9, [sp, #32]1337; NONEON-NOSVE-NEXT: strh w8, [sp, #82]1338; NONEON-NOSVE-NEXT: ldrh w8, [sp, #48]1339; NONEON-NOSVE-NEXT: mul w8, w9, w81340; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]1341; NONEON-NOSVE-NEXT: strh w8, [sp, #80]1342; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]1343; NONEON-NOSVE-NEXT: mul w8, w9, w81344; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]1345; NONEON-NOSVE-NEXT: strh w8, [sp, #78]1346; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]1347; NONEON-NOSVE-NEXT: mul w8, w9, w81348; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]1349; NONEON-NOSVE-NEXT: strh w8, [sp, #76]1350; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]1351; NONEON-NOSVE-NEXT: mul w8, w9, w81352; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]1353; NONEON-NOSVE-NEXT: strh w8, [sp, #74]1354; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]1355; NONEON-NOSVE-NEXT: mul w8, w9, w81356; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]1357; NONEON-NOSVE-NEXT: strh w8, [sp, #72]1358; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]1359; NONEON-NOSVE-NEXT: mul w8, w9, w81360; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]1361; NONEON-NOSVE-NEXT: strh w8, [sp, #70]1362; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]1363; NONEON-NOSVE-NEXT: mul w8, w9, w81364; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]1365; NONEON-NOSVE-NEXT: strh w8, [sp, #68]1366; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]1367; NONEON-NOSVE-NEXT: mul w8, w9, w81368; NONEON-NOSVE-NEXT: ldrh w9, [sp]1369; NONEON-NOSVE-NEXT: strh w8, [sp, #66]1370; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]1371; NONEON-NOSVE-NEXT: mul w8, w9, w81372; NONEON-NOSVE-NEXT: strh w8, [sp, #64]1373; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]1374; NONEON-NOSVE-NEXT: stp q0, q1, [x0]1375; NONEON-NOSVE-NEXT: add sp, sp, #961376; NONEON-NOSVE-NEXT: ret1377 %op1 = load <16 x i16>, ptr %a1378 %op2 = load <16 x i16>, ptr %b1379 %res = mul <16 x i16> %op1, %op21380 store <16 x i16> %res, ptr %a1381 ret void1382}1383 1384define <2 x i32> @mul_v2i32(<2 x i32> %op1, <2 x i32> %op2) {1385; SVE-LABEL: mul_v2i32:1386; SVE: // %bb.0:1387; SVE-NEXT: ptrue p0.s, vl21388; SVE-NEXT: // kill: def $d0 killed $d0 def $z01389; SVE-NEXT: // kill: def $d1 killed $d1 def $z11390; SVE-NEXT: mul z0.s, p0/m, z0.s, z1.s1391; SVE-NEXT: // kill: def $d0 killed $d0 killed $z01392; SVE-NEXT: ret1393;1394; SVE2-LABEL: mul_v2i32:1395; SVE2: // %bb.0:1396; SVE2-NEXT: // kill: def $d0 killed $d0 def $z01397; SVE2-NEXT: // kill: def $d1 killed $d1 def $z11398; SVE2-NEXT: mul z0.s, z0.s, z1.s1399; SVE2-NEXT: // kill: def $d0 killed $d0 killed $z01400; SVE2-NEXT: ret1401;1402; NONEON-NOSVE-LABEL: mul_v2i32:1403; NONEON-NOSVE: // %bb.0:1404; NONEON-NOSVE-NEXT: sub sp, sp, #321405; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 321406; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]1407; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]1408; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]1409; NONEON-NOSVE-NEXT: mul w11, w10, w81410; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]1411; NONEON-NOSVE-NEXT: mul w8, w9, w81412; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #24]1413; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]1414; NONEON-NOSVE-NEXT: add sp, sp, #321415; NONEON-NOSVE-NEXT: ret1416 %res = mul <2 x i32> %op1, %op21417 ret <2 x i32> %res1418}1419 1420define <4 x i32> @mul_v4i32(<4 x i32> %op1, <4 x i32> %op2) {1421; SVE-LABEL: mul_v4i32:1422; SVE: // %bb.0:1423; SVE-NEXT: ptrue p0.s, vl41424; SVE-NEXT: // kill: def $q0 killed $q0 def $z01425; SVE-NEXT: // kill: def $q1 killed $q1 def $z11426; SVE-NEXT: mul z0.s, p0/m, z0.s, z1.s1427; SVE-NEXT: // kill: def $q0 killed $q0 killed $z01428; SVE-NEXT: ret1429;1430; SVE2-LABEL: mul_v4i32:1431; SVE2: // %bb.0:1432; SVE2-NEXT: // kill: def $q0 killed $q0 def $z01433; SVE2-NEXT: // kill: def $q1 killed $q1 def $z11434; SVE2-NEXT: mul z0.s, z0.s, z1.s1435; SVE2-NEXT: // kill: def $q0 killed $q0 killed $z01436; SVE2-NEXT: ret1437;1438; NONEON-NOSVE-LABEL: mul_v4i32:1439; NONEON-NOSVE: // %bb.0:1440; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!1441; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 481442; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]1443; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]1444; NONEON-NOSVE-NEXT: mul w11, w10, w81445; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]1446; NONEON-NOSVE-NEXT: mul w8, w9, w81447; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]1448; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #40]1449; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]1450; NONEON-NOSVE-NEXT: mul w11, w10, w81451; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]1452; NONEON-NOSVE-NEXT: mul w8, w9, w81453; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #32]1454; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]1455; NONEON-NOSVE-NEXT: add sp, sp, #481456; NONEON-NOSVE-NEXT: ret1457 %res = mul <4 x i32> %op1, %op21458 ret <4 x i32> %res1459}1460 1461define void @mul_v8i32(ptr %a, ptr %b) {1462; SVE-LABEL: mul_v8i32:1463; SVE: // %bb.0:1464; SVE-NEXT: ldp q0, q3, [x1]1465; SVE-NEXT: ptrue p0.s, vl41466; SVE-NEXT: ldp q1, q2, [x0]1467; SVE-NEXT: mul z0.s, p0/m, z0.s, z1.s1468; SVE-NEXT: mul z2.s, p0/m, z2.s, z3.s1469; SVE-NEXT: stp q0, q2, [x0]1470; SVE-NEXT: ret1471;1472; SVE2-LABEL: mul_v8i32:1473; SVE2: // %bb.0:1474; SVE2-NEXT: ldp q0, q3, [x1]1475; SVE2-NEXT: ldp q1, q2, [x0]1476; SVE2-NEXT: mul z0.s, z1.s, z0.s1477; SVE2-NEXT: mul z1.s, z2.s, z3.s1478; SVE2-NEXT: stp q0, q1, [x0]1479; SVE2-NEXT: ret1480;1481; NONEON-NOSVE-LABEL: mul_v8i32:1482; NONEON-NOSVE: // %bb.0:1483; NONEON-NOSVE-NEXT: sub sp, sp, #961484; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 961485; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]1486; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]1487; NONEON-NOSVE-NEXT: stp q2, q3, [sp]1488; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]1489; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #40]1490; NONEON-NOSVE-NEXT: ldr w8, [sp, #60]1491; NONEON-NOSVE-NEXT: mul w11, w10, w81492; NONEON-NOSVE-NEXT: ldr w8, [sp, #56]1493; NONEON-NOSVE-NEXT: mul w8, w9, w81494; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #32]1495; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #88]1496; NONEON-NOSVE-NEXT: ldr w8, [sp, #52]1497; NONEON-NOSVE-NEXT: mul w11, w10, w81498; NONEON-NOSVE-NEXT: ldr w8, [sp, #48]1499; NONEON-NOSVE-NEXT: mul w8, w9, w81500; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]1501; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #80]1502; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]1503; NONEON-NOSVE-NEXT: mul w11, w10, w81504; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]1505; NONEON-NOSVE-NEXT: mul w8, w9, w81506; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]1507; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #72]1508; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]1509; NONEON-NOSVE-NEXT: mul w11, w10, w81510; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]1511; NONEON-NOSVE-NEXT: mul w8, w9, w81512; NONEON-NOSVE-NEXT: stp w8, w11, [sp, #64]1513; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]1514; NONEON-NOSVE-NEXT: stp q0, q1, [x0]1515; NONEON-NOSVE-NEXT: add sp, sp, #961516; NONEON-NOSVE-NEXT: ret1517 %op1 = load <8 x i32>, ptr %a1518 %op2 = load <8 x i32>, ptr %b1519 %res = mul <8 x i32> %op1, %op21520 store <8 x i32> %res, ptr %a1521 ret void1522}1523 1524define <1 x i64> @mul_v1i64(<1 x i64> %op1, <1 x i64> %op2) {1525; SVE-LABEL: mul_v1i64:1526; SVE: // %bb.0:1527; SVE-NEXT: ptrue p0.d, vl11528; SVE-NEXT: // kill: def $d0 killed $d0 def $z01529; SVE-NEXT: // kill: def $d1 killed $d1 def $z11530; SVE-NEXT: mul z0.d, p0/m, z0.d, z1.d1531; SVE-NEXT: // kill: def $d0 killed $d0 killed $z01532; SVE-NEXT: ret1533;1534; SVE2-LABEL: mul_v1i64:1535; SVE2: // %bb.0:1536; SVE2-NEXT: // kill: def $d0 killed $d0 def $z01537; SVE2-NEXT: // kill: def $d1 killed $d1 def $z11538; SVE2-NEXT: mul z0.d, z0.d, z1.d1539; SVE2-NEXT: // kill: def $d0 killed $d0 killed $z01540; SVE2-NEXT: ret1541;1542; NONEON-NOSVE-LABEL: mul_v1i64:1543; NONEON-NOSVE: // %bb.0:1544; NONEON-NOSVE-NEXT: sub sp, sp, #161545; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 161546; NONEON-NOSVE-NEXT: fmov x8, d11547; NONEON-NOSVE-NEXT: fmov x9, d01548; NONEON-NOSVE-NEXT: mul x8, x9, x81549; NONEON-NOSVE-NEXT: str x8, [sp, #8]1550; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]1551; NONEON-NOSVE-NEXT: add sp, sp, #161552; NONEON-NOSVE-NEXT: ret1553 %res = mul <1 x i64> %op1, %op21554 ret <1 x i64> %res1555}1556 1557define <2 x i64> @mul_v2i64(<2 x i64> %op1, <2 x i64> %op2) {1558; SVE-LABEL: mul_v2i64:1559; SVE: // %bb.0:1560; SVE-NEXT: ptrue p0.d, vl21561; SVE-NEXT: // kill: def $q0 killed $q0 def $z01562; SVE-NEXT: // kill: def $q1 killed $q1 def $z11563; SVE-NEXT: mul z0.d, p0/m, z0.d, z1.d1564; SVE-NEXT: // kill: def $q0 killed $q0 killed $z01565; SVE-NEXT: ret1566;1567; SVE2-LABEL: mul_v2i64:1568; SVE2: // %bb.0:1569; SVE2-NEXT: // kill: def $q0 killed $q0 def $z01570; SVE2-NEXT: // kill: def $q1 killed $q1 def $z11571; SVE2-NEXT: mul z0.d, z0.d, z1.d1572; SVE2-NEXT: // kill: def $q0 killed $q0 killed $z01573; SVE2-NEXT: ret1574;1575; NONEON-NOSVE-LABEL: mul_v2i64:1576; NONEON-NOSVE: // %bb.0:1577; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!1578; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 481579; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]1580; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]1581; NONEON-NOSVE-NEXT: mul x11, x10, x81582; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]1583; NONEON-NOSVE-NEXT: mul x8, x9, x81584; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #32]1585; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]1586; NONEON-NOSVE-NEXT: add sp, sp, #481587; NONEON-NOSVE-NEXT: ret1588 %res = mul <2 x i64> %op1, %op21589 ret <2 x i64> %res1590}1591 1592define void @mul_v4i64(ptr %a, ptr %b) {1593; SVE-LABEL: mul_v4i64:1594; SVE: // %bb.0:1595; SVE-NEXT: ldp q0, q3, [x1]1596; SVE-NEXT: ptrue p0.d, vl21597; SVE-NEXT: ldp q1, q2, [x0]1598; SVE-NEXT: mul z0.d, p0/m, z0.d, z1.d1599; SVE-NEXT: mul z2.d, p0/m, z2.d, z3.d1600; SVE-NEXT: stp q0, q2, [x0]1601; SVE-NEXT: ret1602;1603; SVE2-LABEL: mul_v4i64:1604; SVE2: // %bb.0:1605; SVE2-NEXT: ldp q0, q3, [x1]1606; SVE2-NEXT: ldp q1, q2, [x0]1607; SVE2-NEXT: mul z0.d, z1.d, z0.d1608; SVE2-NEXT: mul z1.d, z2.d, z3.d1609; SVE2-NEXT: stp q0, q1, [x0]1610; SVE2-NEXT: ret1611;1612; NONEON-NOSVE-LABEL: mul_v4i64:1613; NONEON-NOSVE: // %bb.0:1614; NONEON-NOSVE-NEXT: sub sp, sp, #961615; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 961616; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]1617; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]1618; NONEON-NOSVE-NEXT: stp q2, q3, [sp]1619; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]1620; NONEON-NOSVE-NEXT: ldp x9, x10, [sp, #32]1621; NONEON-NOSVE-NEXT: ldr x8, [sp, #56]1622; NONEON-NOSVE-NEXT: mul x11, x10, x81623; NONEON-NOSVE-NEXT: ldr x8, [sp, #48]1624; NONEON-NOSVE-NEXT: mul x8, x9, x81625; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]1626; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #80]1627; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]1628; NONEON-NOSVE-NEXT: mul x11, x10, x81629; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]1630; NONEON-NOSVE-NEXT: mul x8, x9, x81631; NONEON-NOSVE-NEXT: stp x8, x11, [sp, #64]1632; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]1633; NONEON-NOSVE-NEXT: stp q0, q1, [x0]1634; NONEON-NOSVE-NEXT: add sp, sp, #961635; NONEON-NOSVE-NEXT: ret1636 %op1 = load <4 x i64>, ptr %a1637 %op2 = load <4 x i64>, ptr %b1638 %res = mul <4 x i64> %op1, %op21639 store <4 x i64> %res, ptr %a1640 ret void1641}1642 1643;1644; SUB1645;1646 1647define <4 x i8> @sub_v4i8(<4 x i8> %op1, <4 x i8> %op2) {1648; CHECK-LABEL: sub_v4i8:1649; CHECK: // %bb.0:1650; CHECK-NEXT: // kill: def $d0 killed $d0 def $z01651; CHECK-NEXT: // kill: def $d1 killed $d1 def $z11652; CHECK-NEXT: sub z0.h, z0.h, z1.h1653; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z01654; CHECK-NEXT: ret1655;1656; NONEON-NOSVE-LABEL: sub_v4i8:1657; NONEON-NOSVE: // %bb.0:1658; NONEON-NOSVE-NEXT: sub sp, sp, #321659; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 321660; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]1661; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]1662; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]1663; NONEON-NOSVE-NEXT: sub w8, w9, w81664; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]1665; NONEON-NOSVE-NEXT: strh w8, [sp, #30]1666; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]1667; NONEON-NOSVE-NEXT: sub w8, w9, w81668; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]1669; NONEON-NOSVE-NEXT: strh w8, [sp, #28]1670; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]1671; NONEON-NOSVE-NEXT: sub w8, w9, w81672; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]1673; NONEON-NOSVE-NEXT: strh w8, [sp, #26]1674; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]1675; NONEON-NOSVE-NEXT: sub w8, w9, w81676; NONEON-NOSVE-NEXT: strh w8, [sp, #24]1677; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]1678; NONEON-NOSVE-NEXT: add sp, sp, #321679; NONEON-NOSVE-NEXT: ret1680 %res = sub <4 x i8> %op1, %op21681 ret <4 x i8> %res1682}1683 1684define <8 x i8> @sub_v8i8(<8 x i8> %op1, <8 x i8> %op2) {1685; CHECK-LABEL: sub_v8i8:1686; CHECK: // %bb.0:1687; CHECK-NEXT: // kill: def $d0 killed $d0 def $z01688; CHECK-NEXT: // kill: def $d1 killed $d1 def $z11689; CHECK-NEXT: sub z0.b, z0.b, z1.b1690; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z01691; CHECK-NEXT: ret1692;1693; NONEON-NOSVE-LABEL: sub_v8i8:1694; NONEON-NOSVE: // %bb.0:1695; NONEON-NOSVE-NEXT: sub sp, sp, #321696; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 321697; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]1698; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]1699; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]1700; NONEON-NOSVE-NEXT: sub w8, w9, w81701; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]1702; NONEON-NOSVE-NEXT: strb w8, [sp, #31]1703; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]1704; NONEON-NOSVE-NEXT: sub w8, w9, w81705; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]1706; NONEON-NOSVE-NEXT: strb w8, [sp, #30]1707; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]1708; NONEON-NOSVE-NEXT: sub w8, w9, w81709; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]1710; NONEON-NOSVE-NEXT: strb w8, [sp, #29]1711; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]1712; NONEON-NOSVE-NEXT: sub w8, w9, w81713; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]1714; NONEON-NOSVE-NEXT: strb w8, [sp, #28]1715; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]1716; NONEON-NOSVE-NEXT: sub w8, w9, w81717; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]1718; NONEON-NOSVE-NEXT: strb w8, [sp, #27]1719; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]1720; NONEON-NOSVE-NEXT: sub w8, w9, w81721; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]1722; NONEON-NOSVE-NEXT: strb w8, [sp, #26]1723; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]1724; NONEON-NOSVE-NEXT: sub w8, w9, w81725; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]1726; NONEON-NOSVE-NEXT: strb w8, [sp, #25]1727; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]1728; NONEON-NOSVE-NEXT: sub w8, w9, w81729; NONEON-NOSVE-NEXT: strb w8, [sp, #24]1730; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]1731; NONEON-NOSVE-NEXT: add sp, sp, #321732; NONEON-NOSVE-NEXT: ret1733 %res = sub <8 x i8> %op1, %op21734 ret <8 x i8> %res1735}1736 1737define <16 x i8> @sub_v16i8(<16 x i8> %op1, <16 x i8> %op2) {1738; CHECK-LABEL: sub_v16i8:1739; CHECK: // %bb.0:1740; CHECK-NEXT: // kill: def $q0 killed $q0 def $z01741; CHECK-NEXT: // kill: def $q1 killed $q1 def $z11742; CHECK-NEXT: sub z0.b, z0.b, z1.b1743; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z01744; CHECK-NEXT: ret1745;1746; NONEON-NOSVE-LABEL: sub_v16i8:1747; NONEON-NOSVE: // %bb.0:1748; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!1749; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 481750; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]1751; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]1752; NONEON-NOSVE-NEXT: sub w8, w9, w81753; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]1754; NONEON-NOSVE-NEXT: strb w8, [sp, #47]1755; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]1756; NONEON-NOSVE-NEXT: sub w8, w9, w81757; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]1758; NONEON-NOSVE-NEXT: strb w8, [sp, #46]1759; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]1760; NONEON-NOSVE-NEXT: sub w8, w9, w81761; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]1762; NONEON-NOSVE-NEXT: strb w8, [sp, #45]1763; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]1764; NONEON-NOSVE-NEXT: sub w8, w9, w81765; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]1766; NONEON-NOSVE-NEXT: strb w8, [sp, #44]1767; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]1768; NONEON-NOSVE-NEXT: sub w8, w9, w81769; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]1770; NONEON-NOSVE-NEXT: strb w8, [sp, #43]1771; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]1772; NONEON-NOSVE-NEXT: sub w8, w9, w81773; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]1774; NONEON-NOSVE-NEXT: strb w8, [sp, #42]1775; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]1776; NONEON-NOSVE-NEXT: sub w8, w9, w81777; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]1778; NONEON-NOSVE-NEXT: strb w8, [sp, #41]1779; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]1780; NONEON-NOSVE-NEXT: sub w8, w9, w81781; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]1782; NONEON-NOSVE-NEXT: strb w8, [sp, #40]1783; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]1784; NONEON-NOSVE-NEXT: sub w8, w9, w81785; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]1786; NONEON-NOSVE-NEXT: strb w8, [sp, #39]1787; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]1788; NONEON-NOSVE-NEXT: sub w8, w9, w81789; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]1790; NONEON-NOSVE-NEXT: strb w8, [sp, #38]1791; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]1792; NONEON-NOSVE-NEXT: sub w8, w9, w81793; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]1794; NONEON-NOSVE-NEXT: strb w8, [sp, #37]1795; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]1796; NONEON-NOSVE-NEXT: sub w8, w9, w81797; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]1798; NONEON-NOSVE-NEXT: strb w8, [sp, #36]1799; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]1800; NONEON-NOSVE-NEXT: sub w8, w9, w81801; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]1802; NONEON-NOSVE-NEXT: strb w8, [sp, #35]1803; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]1804; NONEON-NOSVE-NEXT: sub w8, w9, w81805; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]1806; NONEON-NOSVE-NEXT: strb w8, [sp, #34]1807; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]1808; NONEON-NOSVE-NEXT: sub w8, w9, w81809; NONEON-NOSVE-NEXT: ldrb w9, [sp]1810; NONEON-NOSVE-NEXT: strb w8, [sp, #33]1811; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]1812; NONEON-NOSVE-NEXT: sub w8, w9, w81813; NONEON-NOSVE-NEXT: strb w8, [sp, #32]1814; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]1815; NONEON-NOSVE-NEXT: add sp, sp, #481816; NONEON-NOSVE-NEXT: ret1817 %res = sub <16 x i8> %op1, %op21818 ret <16 x i8> %res1819}1820 1821define void @sub_v32i8(ptr %a, ptr %b) {1822; CHECK-LABEL: sub_v32i8:1823; CHECK: // %bb.0:1824; CHECK-NEXT: ldp q0, q3, [x1]1825; CHECK-NEXT: ldp q1, q2, [x0]1826; CHECK-NEXT: sub z0.b, z1.b, z0.b1827; CHECK-NEXT: sub z1.b, z2.b, z3.b1828; CHECK-NEXT: stp q0, q1, [x0]1829; CHECK-NEXT: ret1830;1831; NONEON-NOSVE-LABEL: sub_v32i8:1832; NONEON-NOSVE: // %bb.0:1833; NONEON-NOSVE-NEXT: sub sp, sp, #961834; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 961835; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]1836; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]1837; NONEON-NOSVE-NEXT: stp q2, q3, [sp]1838; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]1839; NONEON-NOSVE-NEXT: ldrb w8, [sp, #63]1840; NONEON-NOSVE-NEXT: ldrb w9, [sp, #47]1841; NONEON-NOSVE-NEXT: sub w8, w9, w81842; NONEON-NOSVE-NEXT: ldrb w9, [sp, #46]1843; NONEON-NOSVE-NEXT: strb w8, [sp, #95]1844; NONEON-NOSVE-NEXT: ldrb w8, [sp, #62]1845; NONEON-NOSVE-NEXT: sub w8, w9, w81846; NONEON-NOSVE-NEXT: ldrb w9, [sp, #45]1847; NONEON-NOSVE-NEXT: strb w8, [sp, #94]1848; NONEON-NOSVE-NEXT: ldrb w8, [sp, #61]1849; NONEON-NOSVE-NEXT: sub w8, w9, w81850; NONEON-NOSVE-NEXT: ldrb w9, [sp, #44]1851; NONEON-NOSVE-NEXT: strb w8, [sp, #93]1852; NONEON-NOSVE-NEXT: ldrb w8, [sp, #60]1853; NONEON-NOSVE-NEXT: sub w8, w9, w81854; NONEON-NOSVE-NEXT: ldrb w9, [sp, #43]1855; NONEON-NOSVE-NEXT: strb w8, [sp, #92]1856; NONEON-NOSVE-NEXT: ldrb w8, [sp, #59]1857; NONEON-NOSVE-NEXT: sub w8, w9, w81858; NONEON-NOSVE-NEXT: ldrb w9, [sp, #42]1859; NONEON-NOSVE-NEXT: strb w8, [sp, #91]1860; NONEON-NOSVE-NEXT: ldrb w8, [sp, #58]1861; NONEON-NOSVE-NEXT: sub w8, w9, w81862; NONEON-NOSVE-NEXT: ldrb w9, [sp, #41]1863; NONEON-NOSVE-NEXT: strb w8, [sp, #90]1864; NONEON-NOSVE-NEXT: ldrb w8, [sp, #57]1865; NONEON-NOSVE-NEXT: sub w8, w9, w81866; NONEON-NOSVE-NEXT: ldrb w9, [sp, #40]1867; NONEON-NOSVE-NEXT: strb w8, [sp, #89]1868; NONEON-NOSVE-NEXT: ldrb w8, [sp, #56]1869; NONEON-NOSVE-NEXT: sub w8, w9, w81870; NONEON-NOSVE-NEXT: ldrb w9, [sp, #39]1871; NONEON-NOSVE-NEXT: strb w8, [sp, #88]1872; NONEON-NOSVE-NEXT: ldrb w8, [sp, #55]1873; NONEON-NOSVE-NEXT: sub w8, w9, w81874; NONEON-NOSVE-NEXT: ldrb w9, [sp, #38]1875; NONEON-NOSVE-NEXT: strb w8, [sp, #87]1876; NONEON-NOSVE-NEXT: ldrb w8, [sp, #54]1877; NONEON-NOSVE-NEXT: sub w8, w9, w81878; NONEON-NOSVE-NEXT: ldrb w9, [sp, #37]1879; NONEON-NOSVE-NEXT: strb w8, [sp, #86]1880; NONEON-NOSVE-NEXT: ldrb w8, [sp, #53]1881; NONEON-NOSVE-NEXT: sub w8, w9, w81882; NONEON-NOSVE-NEXT: ldrb w9, [sp, #36]1883; NONEON-NOSVE-NEXT: strb w8, [sp, #85]1884; NONEON-NOSVE-NEXT: ldrb w8, [sp, #52]1885; NONEON-NOSVE-NEXT: sub w8, w9, w81886; NONEON-NOSVE-NEXT: ldrb w9, [sp, #35]1887; NONEON-NOSVE-NEXT: strb w8, [sp, #84]1888; NONEON-NOSVE-NEXT: ldrb w8, [sp, #51]1889; NONEON-NOSVE-NEXT: sub w8, w9, w81890; NONEON-NOSVE-NEXT: ldrb w9, [sp, #34]1891; NONEON-NOSVE-NEXT: strb w8, [sp, #83]1892; NONEON-NOSVE-NEXT: ldrb w8, [sp, #50]1893; NONEON-NOSVE-NEXT: sub w8, w9, w81894; NONEON-NOSVE-NEXT: ldrb w9, [sp, #33]1895; NONEON-NOSVE-NEXT: strb w8, [sp, #82]1896; NONEON-NOSVE-NEXT: ldrb w8, [sp, #49]1897; NONEON-NOSVE-NEXT: sub w8, w9, w81898; NONEON-NOSVE-NEXT: ldrb w9, [sp, #32]1899; NONEON-NOSVE-NEXT: strb w8, [sp, #81]1900; NONEON-NOSVE-NEXT: ldrb w8, [sp, #48]1901; NONEON-NOSVE-NEXT: sub w8, w9, w81902; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]1903; NONEON-NOSVE-NEXT: strb w8, [sp, #80]1904; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]1905; NONEON-NOSVE-NEXT: sub w8, w9, w81906; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]1907; NONEON-NOSVE-NEXT: strb w8, [sp, #79]1908; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]1909; NONEON-NOSVE-NEXT: sub w8, w9, w81910; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]1911; NONEON-NOSVE-NEXT: strb w8, [sp, #78]1912; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]1913; NONEON-NOSVE-NEXT: sub w8, w9, w81914; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]1915; NONEON-NOSVE-NEXT: strb w8, [sp, #77]1916; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]1917; NONEON-NOSVE-NEXT: sub w8, w9, w81918; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]1919; NONEON-NOSVE-NEXT: strb w8, [sp, #76]1920; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]1921; NONEON-NOSVE-NEXT: sub w8, w9, w81922; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]1923; NONEON-NOSVE-NEXT: strb w8, [sp, #75]1924; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]1925; NONEON-NOSVE-NEXT: sub w8, w9, w81926; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]1927; NONEON-NOSVE-NEXT: strb w8, [sp, #74]1928; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]1929; NONEON-NOSVE-NEXT: sub w8, w9, w81930; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]1931; NONEON-NOSVE-NEXT: strb w8, [sp, #73]1932; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]1933; NONEON-NOSVE-NEXT: sub w8, w9, w81934; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]1935; NONEON-NOSVE-NEXT: strb w8, [sp, #72]1936; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]1937; NONEON-NOSVE-NEXT: sub w8, w9, w81938; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]1939; NONEON-NOSVE-NEXT: strb w8, [sp, #71]1940; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]1941; NONEON-NOSVE-NEXT: sub w8, w9, w81942; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]1943; NONEON-NOSVE-NEXT: strb w8, [sp, #70]1944; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]1945; NONEON-NOSVE-NEXT: sub w8, w9, w81946; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]1947; NONEON-NOSVE-NEXT: strb w8, [sp, #69]1948; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]1949; NONEON-NOSVE-NEXT: sub w8, w9, w81950; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]1951; NONEON-NOSVE-NEXT: strb w8, [sp, #68]1952; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]1953; NONEON-NOSVE-NEXT: sub w8, w9, w81954; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]1955; NONEON-NOSVE-NEXT: strb w8, [sp, #67]1956; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]1957; NONEON-NOSVE-NEXT: sub w8, w9, w81958; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]1959; NONEON-NOSVE-NEXT: strb w8, [sp, #66]1960; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]1961; NONEON-NOSVE-NEXT: sub w8, w9, w81962; NONEON-NOSVE-NEXT: ldrb w9, [sp]1963; NONEON-NOSVE-NEXT: strb w8, [sp, #65]1964; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]1965; NONEON-NOSVE-NEXT: sub w8, w9, w81966; NONEON-NOSVE-NEXT: strb w8, [sp, #64]1967; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]1968; NONEON-NOSVE-NEXT: stp q0, q1, [x0]1969; NONEON-NOSVE-NEXT: add sp, sp, #961970; NONEON-NOSVE-NEXT: ret1971 %op1 = load <32 x i8>, ptr %a1972 %op2 = load <32 x i8>, ptr %b1973 %res = sub <32 x i8> %op1, %op21974 store <32 x i8> %res, ptr %a1975 ret void1976}1977 1978define <2 x i16> @sub_v2i16(<2 x i16> %op1, <2 x i16> %op2) {1979; CHECK-LABEL: sub_v2i16:1980; CHECK: // %bb.0:1981; CHECK-NEXT: // kill: def $d0 killed $d0 def $z01982; CHECK-NEXT: // kill: def $d1 killed $d1 def $z11983; CHECK-NEXT: sub z0.s, z0.s, z1.s1984; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z01985; CHECK-NEXT: ret1986;1987; NONEON-NOSVE-LABEL: sub_v2i16:1988; NONEON-NOSVE: // %bb.0:1989; NONEON-NOSVE-NEXT: sub sp, sp, #321990; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 321991; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]1992; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]1993; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]1994; NONEON-NOSVE-NEXT: sub w8, w10, w81995; NONEON-NOSVE-NEXT: str w8, [sp, #28]1996; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]1997; NONEON-NOSVE-NEXT: sub w8, w9, w81998; NONEON-NOSVE-NEXT: str w8, [sp, #24]1999; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]2000; NONEON-NOSVE-NEXT: add sp, sp, #322001; NONEON-NOSVE-NEXT: ret2002 %res = sub <2 x i16> %op1, %op22003 ret <2 x i16> %res2004}2005 2006define <4 x i16> @sub_v4i16(<4 x i16> %op1, <4 x i16> %op2) {2007; CHECK-LABEL: sub_v4i16:2008; CHECK: // %bb.0:2009; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02010; CHECK-NEXT: // kill: def $d1 killed $d1 def $z12011; CHECK-NEXT: sub z0.h, z0.h, z1.h2012; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02013; CHECK-NEXT: ret2014;2015; NONEON-NOSVE-LABEL: sub_v4i16:2016; NONEON-NOSVE: // %bb.0:2017; NONEON-NOSVE-NEXT: sub sp, sp, #322018; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 322019; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]2020; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]2021; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]2022; NONEON-NOSVE-NEXT: sub w8, w9, w82023; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]2024; NONEON-NOSVE-NEXT: strh w8, [sp, #30]2025; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]2026; NONEON-NOSVE-NEXT: sub w8, w9, w82027; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]2028; NONEON-NOSVE-NEXT: strh w8, [sp, #28]2029; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]2030; NONEON-NOSVE-NEXT: sub w8, w9, w82031; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]2032; NONEON-NOSVE-NEXT: strh w8, [sp, #26]2033; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]2034; NONEON-NOSVE-NEXT: sub w8, w9, w82035; NONEON-NOSVE-NEXT: strh w8, [sp, #24]2036; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]2037; NONEON-NOSVE-NEXT: add sp, sp, #322038; NONEON-NOSVE-NEXT: ret2039 %res = sub <4 x i16> %op1, %op22040 ret <4 x i16> %res2041}2042 2043define <8 x i16> @sub_v8i16(<8 x i16> %op1, <8 x i16> %op2) {2044; CHECK-LABEL: sub_v8i16:2045; CHECK: // %bb.0:2046; CHECK-NEXT: // kill: def $q0 killed $q0 def $z02047; CHECK-NEXT: // kill: def $q1 killed $q1 def $z12048; CHECK-NEXT: sub z0.h, z0.h, z1.h2049; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z02050; CHECK-NEXT: ret2051;2052; NONEON-NOSVE-LABEL: sub_v8i16:2053; NONEON-NOSVE: // %bb.0:2054; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!2055; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 482056; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]2057; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]2058; NONEON-NOSVE-NEXT: sub w8, w9, w82059; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]2060; NONEON-NOSVE-NEXT: strh w8, [sp, #46]2061; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]2062; NONEON-NOSVE-NEXT: sub w8, w9, w82063; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]2064; NONEON-NOSVE-NEXT: strh w8, [sp, #44]2065; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]2066; NONEON-NOSVE-NEXT: sub w8, w9, w82067; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]2068; NONEON-NOSVE-NEXT: strh w8, [sp, #42]2069; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]2070; NONEON-NOSVE-NEXT: sub w8, w9, w82071; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]2072; NONEON-NOSVE-NEXT: strh w8, [sp, #40]2073; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]2074; NONEON-NOSVE-NEXT: sub w8, w9, w82075; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]2076; NONEON-NOSVE-NEXT: strh w8, [sp, #38]2077; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]2078; NONEON-NOSVE-NEXT: sub w8, w9, w82079; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]2080; NONEON-NOSVE-NEXT: strh w8, [sp, #36]2081; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]2082; NONEON-NOSVE-NEXT: sub w8, w9, w82083; NONEON-NOSVE-NEXT: ldrh w9, [sp]2084; NONEON-NOSVE-NEXT: strh w8, [sp, #34]2085; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]2086; NONEON-NOSVE-NEXT: sub w8, w9, w82087; NONEON-NOSVE-NEXT: strh w8, [sp, #32]2088; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]2089; NONEON-NOSVE-NEXT: add sp, sp, #482090; NONEON-NOSVE-NEXT: ret2091 %res = sub <8 x i16> %op1, %op22092 ret <8 x i16> %res2093}2094 2095define void @sub_v16i16(ptr %a, ptr %b) {2096; CHECK-LABEL: sub_v16i16:2097; CHECK: // %bb.0:2098; CHECK-NEXT: ldp q0, q3, [x1]2099; CHECK-NEXT: ldp q1, q2, [x0]2100; CHECK-NEXT: sub z0.h, z1.h, z0.h2101; CHECK-NEXT: sub z1.h, z2.h, z3.h2102; CHECK-NEXT: stp q0, q1, [x0]2103; CHECK-NEXT: ret2104;2105; NONEON-NOSVE-LABEL: sub_v16i16:2106; NONEON-NOSVE: // %bb.0:2107; NONEON-NOSVE-NEXT: sub sp, sp, #962108; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 962109; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]2110; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]2111; NONEON-NOSVE-NEXT: stp q2, q3, [sp]2112; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]2113; NONEON-NOSVE-NEXT: ldrh w8, [sp, #62]2114; NONEON-NOSVE-NEXT: ldrh w9, [sp, #46]2115; NONEON-NOSVE-NEXT: sub w8, w9, w82116; NONEON-NOSVE-NEXT: ldrh w9, [sp, #44]2117; NONEON-NOSVE-NEXT: strh w8, [sp, #94]2118; NONEON-NOSVE-NEXT: ldrh w8, [sp, #60]2119; NONEON-NOSVE-NEXT: sub w8, w9, w82120; NONEON-NOSVE-NEXT: ldrh w9, [sp, #42]2121; NONEON-NOSVE-NEXT: strh w8, [sp, #92]2122; NONEON-NOSVE-NEXT: ldrh w8, [sp, #58]2123; NONEON-NOSVE-NEXT: sub w8, w9, w82124; NONEON-NOSVE-NEXT: ldrh w9, [sp, #40]2125; NONEON-NOSVE-NEXT: strh w8, [sp, #90]2126; NONEON-NOSVE-NEXT: ldrh w8, [sp, #56]2127; NONEON-NOSVE-NEXT: sub w8, w9, w82128; NONEON-NOSVE-NEXT: ldrh w9, [sp, #38]2129; NONEON-NOSVE-NEXT: strh w8, [sp, #88]2130; NONEON-NOSVE-NEXT: ldrh w8, [sp, #54]2131; NONEON-NOSVE-NEXT: sub w8, w9, w82132; NONEON-NOSVE-NEXT: ldrh w9, [sp, #36]2133; NONEON-NOSVE-NEXT: strh w8, [sp, #86]2134; NONEON-NOSVE-NEXT: ldrh w8, [sp, #52]2135; NONEON-NOSVE-NEXT: sub w8, w9, w82136; NONEON-NOSVE-NEXT: ldrh w9, [sp, #34]2137; NONEON-NOSVE-NEXT: strh w8, [sp, #84]2138; NONEON-NOSVE-NEXT: ldrh w8, [sp, #50]2139; NONEON-NOSVE-NEXT: sub w8, w9, w82140; NONEON-NOSVE-NEXT: ldrh w9, [sp, #32]2141; NONEON-NOSVE-NEXT: strh w8, [sp, #82]2142; NONEON-NOSVE-NEXT: ldrh w8, [sp, #48]2143; NONEON-NOSVE-NEXT: sub w8, w9, w82144; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]2145; NONEON-NOSVE-NEXT: strh w8, [sp, #80]2146; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]2147; NONEON-NOSVE-NEXT: sub w8, w9, w82148; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]2149; NONEON-NOSVE-NEXT: strh w8, [sp, #78]2150; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]2151; NONEON-NOSVE-NEXT: sub w8, w9, w82152; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]2153; NONEON-NOSVE-NEXT: strh w8, [sp, #76]2154; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]2155; NONEON-NOSVE-NEXT: sub w8, w9, w82156; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]2157; NONEON-NOSVE-NEXT: strh w8, [sp, #74]2158; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]2159; NONEON-NOSVE-NEXT: sub w8, w9, w82160; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]2161; NONEON-NOSVE-NEXT: strh w8, [sp, #72]2162; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]2163; NONEON-NOSVE-NEXT: sub w8, w9, w82164; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]2165; NONEON-NOSVE-NEXT: strh w8, [sp, #70]2166; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]2167; NONEON-NOSVE-NEXT: sub w8, w9, w82168; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]2169; NONEON-NOSVE-NEXT: strh w8, [sp, #68]2170; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]2171; NONEON-NOSVE-NEXT: sub w8, w9, w82172; NONEON-NOSVE-NEXT: ldrh w9, [sp]2173; NONEON-NOSVE-NEXT: strh w8, [sp, #66]2174; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]2175; NONEON-NOSVE-NEXT: sub w8, w9, w82176; NONEON-NOSVE-NEXT: strh w8, [sp, #64]2177; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]2178; NONEON-NOSVE-NEXT: stp q0, q1, [x0]2179; NONEON-NOSVE-NEXT: add sp, sp, #962180; NONEON-NOSVE-NEXT: ret2181 %op1 = load <16 x i16>, ptr %a2182 %op2 = load <16 x i16>, ptr %b2183 %res = sub <16 x i16> %op1, %op22184 store <16 x i16> %res, ptr %a2185 ret void2186}2187 2188define <2 x i32> @sub_v2i32(<2 x i32> %op1, <2 x i32> %op2) {2189; CHECK-LABEL: sub_v2i32:2190; CHECK: // %bb.0:2191; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02192; CHECK-NEXT: // kill: def $d1 killed $d1 def $z12193; CHECK-NEXT: sub z0.s, z0.s, z1.s2194; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02195; CHECK-NEXT: ret2196;2197; NONEON-NOSVE-LABEL: sub_v2i32:2198; NONEON-NOSVE: // %bb.0:2199; NONEON-NOSVE-NEXT: sub sp, sp, #322200; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 322201; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]2202; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]2203; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]2204; NONEON-NOSVE-NEXT: sub w8, w10, w82205; NONEON-NOSVE-NEXT: str w8, [sp, #28]2206; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]2207; NONEON-NOSVE-NEXT: sub w8, w9, w82208; NONEON-NOSVE-NEXT: str w8, [sp, #24]2209; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]2210; NONEON-NOSVE-NEXT: add sp, sp, #322211; NONEON-NOSVE-NEXT: ret2212 %res = sub <2 x i32> %op1, %op22213 ret <2 x i32> %res2214}2215 2216define <4 x i32> @sub_v4i32(<4 x i32> %op1, <4 x i32> %op2) {2217; CHECK-LABEL: sub_v4i32:2218; CHECK: // %bb.0:2219; CHECK-NEXT: // kill: def $q0 killed $q0 def $z02220; CHECK-NEXT: // kill: def $q1 killed $q1 def $z12221; CHECK-NEXT: sub z0.s, z0.s, z1.s2222; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z02223; CHECK-NEXT: ret2224;2225; NONEON-NOSVE-LABEL: sub_v4i32:2226; NONEON-NOSVE: // %bb.0:2227; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!2228; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 482229; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]2230; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]2231; NONEON-NOSVE-NEXT: sub w8, w10, w82232; NONEON-NOSVE-NEXT: str w8, [sp, #44]2233; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]2234; NONEON-NOSVE-NEXT: sub w8, w9, w82235; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]2236; NONEON-NOSVE-NEXT: str w8, [sp, #40]2237; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]2238; NONEON-NOSVE-NEXT: sub w8, w10, w82239; NONEON-NOSVE-NEXT: str w8, [sp, #36]2240; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]2241; NONEON-NOSVE-NEXT: sub w8, w9, w82242; NONEON-NOSVE-NEXT: str w8, [sp, #32]2243; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]2244; NONEON-NOSVE-NEXT: add sp, sp, #482245; NONEON-NOSVE-NEXT: ret2246 %res = sub <4 x i32> %op1, %op22247 ret <4 x i32> %res2248}2249 2250define void @sub_v8i32(ptr %a, ptr %b) {2251; CHECK-LABEL: sub_v8i32:2252; CHECK: // %bb.0:2253; CHECK-NEXT: ldp q0, q3, [x1]2254; CHECK-NEXT: ldp q1, q2, [x0]2255; CHECK-NEXT: sub z0.s, z1.s, z0.s2256; CHECK-NEXT: sub z1.s, z2.s, z3.s2257; CHECK-NEXT: stp q0, q1, [x0]2258; CHECK-NEXT: ret2259;2260; NONEON-NOSVE-LABEL: sub_v8i32:2261; NONEON-NOSVE: // %bb.0:2262; NONEON-NOSVE-NEXT: sub sp, sp, #962263; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 962264; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]2265; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]2266; NONEON-NOSVE-NEXT: stp q2, q3, [sp]2267; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]2268; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #40]2269; NONEON-NOSVE-NEXT: ldr w8, [sp, #60]2270; NONEON-NOSVE-NEXT: sub w8, w10, w82271; NONEON-NOSVE-NEXT: str w8, [sp, #92]2272; NONEON-NOSVE-NEXT: ldr w8, [sp, #56]2273; NONEON-NOSVE-NEXT: sub w8, w9, w82274; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #32]2275; NONEON-NOSVE-NEXT: str w8, [sp, #88]2276; NONEON-NOSVE-NEXT: ldr w8, [sp, #52]2277; NONEON-NOSVE-NEXT: sub w8, w10, w82278; NONEON-NOSVE-NEXT: str w8, [sp, #84]2279; NONEON-NOSVE-NEXT: ldr w8, [sp, #48]2280; NONEON-NOSVE-NEXT: sub w8, w9, w82281; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]2282; NONEON-NOSVE-NEXT: str w8, [sp, #80]2283; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]2284; NONEON-NOSVE-NEXT: sub w8, w10, w82285; NONEON-NOSVE-NEXT: str w8, [sp, #76]2286; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]2287; NONEON-NOSVE-NEXT: sub w8, w9, w82288; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]2289; NONEON-NOSVE-NEXT: str w8, [sp, #72]2290; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]2291; NONEON-NOSVE-NEXT: sub w8, w10, w82292; NONEON-NOSVE-NEXT: str w8, [sp, #68]2293; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]2294; NONEON-NOSVE-NEXT: sub w8, w9, w82295; NONEON-NOSVE-NEXT: str w8, [sp, #64]2296; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]2297; NONEON-NOSVE-NEXT: stp q0, q1, [x0]2298; NONEON-NOSVE-NEXT: add sp, sp, #962299; NONEON-NOSVE-NEXT: ret2300 %op1 = load <8 x i32>, ptr %a2301 %op2 = load <8 x i32>, ptr %b2302 %res = sub <8 x i32> %op1, %op22303 store <8 x i32> %res, ptr %a2304 ret void2305}2306 2307define <1 x i64> @sub_v1i64(<1 x i64> %op1, <1 x i64> %op2) {2308; CHECK-LABEL: sub_v1i64:2309; CHECK: // %bb.0:2310; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02311; CHECK-NEXT: // kill: def $d1 killed $d1 def $z12312; CHECK-NEXT: sub z0.d, z0.d, z1.d2313; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02314; CHECK-NEXT: ret2315;2316; NONEON-NOSVE-LABEL: sub_v1i64:2317; NONEON-NOSVE: // %bb.0:2318; NONEON-NOSVE-NEXT: sub sp, sp, #162319; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 162320; NONEON-NOSVE-NEXT: fmov x8, d12321; NONEON-NOSVE-NEXT: fmov x9, d02322; NONEON-NOSVE-NEXT: sub x8, x9, x82323; NONEON-NOSVE-NEXT: str x8, [sp, #8]2324; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]2325; NONEON-NOSVE-NEXT: add sp, sp, #162326; NONEON-NOSVE-NEXT: ret2327 %res = sub <1 x i64> %op1, %op22328 ret <1 x i64> %res2329}2330 2331define <2 x i64> @sub_v2i64(<2 x i64> %op1, <2 x i64> %op2) {2332; CHECK-LABEL: sub_v2i64:2333; CHECK: // %bb.0:2334; CHECK-NEXT: // kill: def $q0 killed $q0 def $z02335; CHECK-NEXT: // kill: def $q1 killed $q1 def $z12336; CHECK-NEXT: sub z0.d, z0.d, z1.d2337; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z02338; CHECK-NEXT: ret2339;2340; NONEON-NOSVE-LABEL: sub_v2i64:2341; NONEON-NOSVE: // %bb.0:2342; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!2343; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 482344; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]2345; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]2346; NONEON-NOSVE-NEXT: sub x8, x10, x82347; NONEON-NOSVE-NEXT: str x8, [sp, #40]2348; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]2349; NONEON-NOSVE-NEXT: sub x8, x9, x82350; NONEON-NOSVE-NEXT: str x8, [sp, #32]2351; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]2352; NONEON-NOSVE-NEXT: add sp, sp, #482353; NONEON-NOSVE-NEXT: ret2354 %res = sub <2 x i64> %op1, %op22355 ret <2 x i64> %res2356}2357 2358define void @sub_v4i64(ptr %a, ptr %b) {2359; CHECK-LABEL: sub_v4i64:2360; CHECK: // %bb.0:2361; CHECK-NEXT: ldp q0, q3, [x1]2362; CHECK-NEXT: ldp q1, q2, [x0]2363; CHECK-NEXT: sub z0.d, z1.d, z0.d2364; CHECK-NEXT: sub z1.d, z2.d, z3.d2365; CHECK-NEXT: stp q0, q1, [x0]2366; CHECK-NEXT: ret2367;2368; NONEON-NOSVE-LABEL: sub_v4i64:2369; NONEON-NOSVE: // %bb.0:2370; NONEON-NOSVE-NEXT: sub sp, sp, #962371; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 962372; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]2373; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]2374; NONEON-NOSVE-NEXT: stp q2, q3, [sp]2375; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]2376; NONEON-NOSVE-NEXT: ldp x9, x10, [sp, #32]2377; NONEON-NOSVE-NEXT: ldr x8, [sp, #56]2378; NONEON-NOSVE-NEXT: sub x8, x10, x82379; NONEON-NOSVE-NEXT: str x8, [sp, #88]2380; NONEON-NOSVE-NEXT: ldr x8, [sp, #48]2381; NONEON-NOSVE-NEXT: sub x8, x9, x82382; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]2383; NONEON-NOSVE-NEXT: str x8, [sp, #80]2384; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]2385; NONEON-NOSVE-NEXT: sub x8, x10, x82386; NONEON-NOSVE-NEXT: str x8, [sp, #72]2387; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]2388; NONEON-NOSVE-NEXT: sub x8, x9, x82389; NONEON-NOSVE-NEXT: str x8, [sp, #64]2390; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]2391; NONEON-NOSVE-NEXT: stp q0, q1, [x0]2392; NONEON-NOSVE-NEXT: add sp, sp, #962393; NONEON-NOSVE-NEXT: ret2394 %op1 = load <4 x i64>, ptr %a2395 %op2 = load <4 x i64>, ptr %b2396 %res = sub <4 x i64> %op1, %op22397 store <4 x i64> %res, ptr %a2398 ret void2399}2400 2401;2402; ABS2403;2404 2405define <4 x i8> @abs_v4i8(<4 x i8> %op1) {2406; CHECK-LABEL: abs_v4i8:2407; CHECK: // %bb.0:2408; CHECK-NEXT: ptrue p0.h, vl42409; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02410; CHECK-NEXT: sxtb z0.h, p0/m, z0.h2411; CHECK-NEXT: abs z0.h, p0/m, z0.h2412; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02413; CHECK-NEXT: ret2414;2415; NONEON-NOSVE-LABEL: abs_v4i8:2416; NONEON-NOSVE: // %bb.0:2417; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!2418; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 162419; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #6]2420; NONEON-NOSVE-NEXT: ldrsb w9, [sp, #4]2421; NONEON-NOSVE-NEXT: ldrsb w10, [sp, #2]2422; NONEON-NOSVE-NEXT: ldrsb w11, [sp]2423; NONEON-NOSVE-NEXT: cmp w8, #02424; NONEON-NOSVE-NEXT: cneg w8, w8, mi2425; NONEON-NOSVE-NEXT: cmp w9, #02426; NONEON-NOSVE-NEXT: strh w8, [sp, #14]2427; NONEON-NOSVE-NEXT: cneg w8, w9, mi2428; NONEON-NOSVE-NEXT: cmp w10, #02429; NONEON-NOSVE-NEXT: strh w8, [sp, #12]2430; NONEON-NOSVE-NEXT: cneg w8, w10, mi2431; NONEON-NOSVE-NEXT: cmp w11, #02432; NONEON-NOSVE-NEXT: strh w8, [sp, #10]2433; NONEON-NOSVE-NEXT: cneg w8, w11, mi2434; NONEON-NOSVE-NEXT: strh w8, [sp, #8]2435; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]2436; NONEON-NOSVE-NEXT: add sp, sp, #162437; NONEON-NOSVE-NEXT: ret2438 %res = call <4 x i8> @llvm.abs.v4i8(<4 x i8> %op1, i1 false)2439 ret <4 x i8> %res2440}2441 2442define <8 x i8> @abs_v8i8(<8 x i8> %op1) {2443; CHECK-LABEL: abs_v8i8:2444; CHECK: // %bb.0:2445; CHECK-NEXT: ptrue p0.b, vl82446; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02447; CHECK-NEXT: abs z0.b, p0/m, z0.b2448; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02449; CHECK-NEXT: ret2450;2451; NONEON-NOSVE-LABEL: abs_v8i8:2452; NONEON-NOSVE: // %bb.0:2453; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!2454; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 162455; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #7]2456; NONEON-NOSVE-NEXT: cmp w8, #02457; NONEON-NOSVE-NEXT: cneg w8, w8, mi2458; NONEON-NOSVE-NEXT: strb w8, [sp, #15]2459; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #6]2460; NONEON-NOSVE-NEXT: cmp w8, #02461; NONEON-NOSVE-NEXT: cneg w8, w8, mi2462; NONEON-NOSVE-NEXT: strb w8, [sp, #14]2463; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #5]2464; NONEON-NOSVE-NEXT: cmp w8, #02465; NONEON-NOSVE-NEXT: cneg w8, w8, mi2466; NONEON-NOSVE-NEXT: strb w8, [sp, #13]2467; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #4]2468; NONEON-NOSVE-NEXT: cmp w8, #02469; NONEON-NOSVE-NEXT: cneg w8, w8, mi2470; NONEON-NOSVE-NEXT: strb w8, [sp, #12]2471; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #3]2472; NONEON-NOSVE-NEXT: cmp w8, #02473; NONEON-NOSVE-NEXT: cneg w8, w8, mi2474; NONEON-NOSVE-NEXT: strb w8, [sp, #11]2475; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #2]2476; NONEON-NOSVE-NEXT: cmp w8, #02477; NONEON-NOSVE-NEXT: cneg w8, w8, mi2478; NONEON-NOSVE-NEXT: strb w8, [sp, #10]2479; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #1]2480; NONEON-NOSVE-NEXT: cmp w8, #02481; NONEON-NOSVE-NEXT: cneg w8, w8, mi2482; NONEON-NOSVE-NEXT: strb w8, [sp, #9]2483; NONEON-NOSVE-NEXT: ldrsb w8, [sp]2484; NONEON-NOSVE-NEXT: cmp w8, #02485; NONEON-NOSVE-NEXT: cneg w8, w8, mi2486; NONEON-NOSVE-NEXT: strb w8, [sp, #8]2487; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]2488; NONEON-NOSVE-NEXT: add sp, sp, #162489; NONEON-NOSVE-NEXT: ret2490 %res = call <8 x i8> @llvm.abs.v8i8(<8 x i8> %op1, i1 false)2491 ret <8 x i8> %res2492}2493 2494define <16 x i8> @abs_v16i8(<16 x i8> %op1) {2495; CHECK-LABEL: abs_v16i8:2496; CHECK: // %bb.0:2497; CHECK-NEXT: ptrue p0.b, vl162498; CHECK-NEXT: // kill: def $q0 killed $q0 def $z02499; CHECK-NEXT: abs z0.b, p0/m, z0.b2500; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z02501; CHECK-NEXT: ret2502;2503; NONEON-NOSVE-LABEL: abs_v16i8:2504; NONEON-NOSVE: // %bb.0:2505; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!2506; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 322507; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #15]2508; NONEON-NOSVE-NEXT: cmp w8, #02509; NONEON-NOSVE-NEXT: cneg w8, w8, mi2510; NONEON-NOSVE-NEXT: strb w8, [sp, #31]2511; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #14]2512; NONEON-NOSVE-NEXT: cmp w8, #02513; NONEON-NOSVE-NEXT: cneg w8, w8, mi2514; NONEON-NOSVE-NEXT: strb w8, [sp, #30]2515; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #13]2516; NONEON-NOSVE-NEXT: cmp w8, #02517; NONEON-NOSVE-NEXT: cneg w8, w8, mi2518; NONEON-NOSVE-NEXT: strb w8, [sp, #29]2519; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #12]2520; NONEON-NOSVE-NEXT: cmp w8, #02521; NONEON-NOSVE-NEXT: cneg w8, w8, mi2522; NONEON-NOSVE-NEXT: strb w8, [sp, #28]2523; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #11]2524; NONEON-NOSVE-NEXT: cmp w8, #02525; NONEON-NOSVE-NEXT: cneg w8, w8, mi2526; NONEON-NOSVE-NEXT: strb w8, [sp, #27]2527; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #10]2528; NONEON-NOSVE-NEXT: cmp w8, #02529; NONEON-NOSVE-NEXT: cneg w8, w8, mi2530; NONEON-NOSVE-NEXT: strb w8, [sp, #26]2531; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #9]2532; NONEON-NOSVE-NEXT: cmp w8, #02533; NONEON-NOSVE-NEXT: cneg w8, w8, mi2534; NONEON-NOSVE-NEXT: strb w8, [sp, #25]2535; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #8]2536; NONEON-NOSVE-NEXT: cmp w8, #02537; NONEON-NOSVE-NEXT: cneg w8, w8, mi2538; NONEON-NOSVE-NEXT: strb w8, [sp, #24]2539; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #7]2540; NONEON-NOSVE-NEXT: cmp w8, #02541; NONEON-NOSVE-NEXT: cneg w8, w8, mi2542; NONEON-NOSVE-NEXT: strb w8, [sp, #23]2543; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #6]2544; NONEON-NOSVE-NEXT: cmp w8, #02545; NONEON-NOSVE-NEXT: cneg w8, w8, mi2546; NONEON-NOSVE-NEXT: strb w8, [sp, #22]2547; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #5]2548; NONEON-NOSVE-NEXT: cmp w8, #02549; NONEON-NOSVE-NEXT: cneg w8, w8, mi2550; NONEON-NOSVE-NEXT: strb w8, [sp, #21]2551; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #4]2552; NONEON-NOSVE-NEXT: cmp w8, #02553; NONEON-NOSVE-NEXT: cneg w8, w8, mi2554; NONEON-NOSVE-NEXT: strb w8, [sp, #20]2555; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #3]2556; NONEON-NOSVE-NEXT: cmp w8, #02557; NONEON-NOSVE-NEXT: cneg w8, w8, mi2558; NONEON-NOSVE-NEXT: strb w8, [sp, #19]2559; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #2]2560; NONEON-NOSVE-NEXT: cmp w8, #02561; NONEON-NOSVE-NEXT: cneg w8, w8, mi2562; NONEON-NOSVE-NEXT: strb w8, [sp, #18]2563; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #1]2564; NONEON-NOSVE-NEXT: cmp w8, #02565; NONEON-NOSVE-NEXT: cneg w8, w8, mi2566; NONEON-NOSVE-NEXT: strb w8, [sp, #17]2567; NONEON-NOSVE-NEXT: ldrsb w8, [sp]2568; NONEON-NOSVE-NEXT: cmp w8, #02569; NONEON-NOSVE-NEXT: cneg w8, w8, mi2570; NONEON-NOSVE-NEXT: strb w8, [sp, #16]2571; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]2572; NONEON-NOSVE-NEXT: add sp, sp, #322573; NONEON-NOSVE-NEXT: ret2574 %res = call <16 x i8> @llvm.abs.v16i8(<16 x i8> %op1, i1 false)2575 ret <16 x i8> %res2576}2577 2578define void @abs_v32i8(ptr %a) {2579; CHECK-LABEL: abs_v32i8:2580; CHECK: // %bb.0:2581; CHECK-NEXT: ldp q0, q1, [x0]2582; CHECK-NEXT: ptrue p0.b, vl162583; CHECK-NEXT: abs z0.b, p0/m, z0.b2584; CHECK-NEXT: abs z1.b, p0/m, z1.b2585; CHECK-NEXT: stp q0, q1, [x0]2586; CHECK-NEXT: ret2587;2588; NONEON-NOSVE-LABEL: abs_v32i8:2589; NONEON-NOSVE: // %bb.0:2590; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]2591; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!2592; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 642593; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #31]2594; NONEON-NOSVE-NEXT: cmp w8, #02595; NONEON-NOSVE-NEXT: cneg w8, w8, mi2596; NONEON-NOSVE-NEXT: strb w8, [sp, #63]2597; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #30]2598; NONEON-NOSVE-NEXT: cmp w8, #02599; NONEON-NOSVE-NEXT: cneg w8, w8, mi2600; NONEON-NOSVE-NEXT: strb w8, [sp, #62]2601; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #29]2602; NONEON-NOSVE-NEXT: cmp w8, #02603; NONEON-NOSVE-NEXT: cneg w8, w8, mi2604; NONEON-NOSVE-NEXT: strb w8, [sp, #61]2605; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #28]2606; NONEON-NOSVE-NEXT: cmp w8, #02607; NONEON-NOSVE-NEXT: cneg w8, w8, mi2608; NONEON-NOSVE-NEXT: strb w8, [sp, #60]2609; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #27]2610; NONEON-NOSVE-NEXT: cmp w8, #02611; NONEON-NOSVE-NEXT: cneg w8, w8, mi2612; NONEON-NOSVE-NEXT: strb w8, [sp, #59]2613; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #26]2614; NONEON-NOSVE-NEXT: cmp w8, #02615; NONEON-NOSVE-NEXT: cneg w8, w8, mi2616; NONEON-NOSVE-NEXT: strb w8, [sp, #58]2617; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #25]2618; NONEON-NOSVE-NEXT: cmp w8, #02619; NONEON-NOSVE-NEXT: cneg w8, w8, mi2620; NONEON-NOSVE-NEXT: strb w8, [sp, #57]2621; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #24]2622; NONEON-NOSVE-NEXT: cmp w8, #02623; NONEON-NOSVE-NEXT: cneg w8, w8, mi2624; NONEON-NOSVE-NEXT: strb w8, [sp, #56]2625; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #23]2626; NONEON-NOSVE-NEXT: cmp w8, #02627; NONEON-NOSVE-NEXT: cneg w8, w8, mi2628; NONEON-NOSVE-NEXT: strb w8, [sp, #55]2629; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #22]2630; NONEON-NOSVE-NEXT: cmp w8, #02631; NONEON-NOSVE-NEXT: cneg w8, w8, mi2632; NONEON-NOSVE-NEXT: strb w8, [sp, #54]2633; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #21]2634; NONEON-NOSVE-NEXT: cmp w8, #02635; NONEON-NOSVE-NEXT: cneg w8, w8, mi2636; NONEON-NOSVE-NEXT: strb w8, [sp, #53]2637; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #20]2638; NONEON-NOSVE-NEXT: cmp w8, #02639; NONEON-NOSVE-NEXT: cneg w8, w8, mi2640; NONEON-NOSVE-NEXT: strb w8, [sp, #52]2641; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #19]2642; NONEON-NOSVE-NEXT: cmp w8, #02643; NONEON-NOSVE-NEXT: cneg w8, w8, mi2644; NONEON-NOSVE-NEXT: strb w8, [sp, #51]2645; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #18]2646; NONEON-NOSVE-NEXT: cmp w8, #02647; NONEON-NOSVE-NEXT: cneg w8, w8, mi2648; NONEON-NOSVE-NEXT: strb w8, [sp, #50]2649; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #17]2650; NONEON-NOSVE-NEXT: cmp w8, #02651; NONEON-NOSVE-NEXT: cneg w8, w8, mi2652; NONEON-NOSVE-NEXT: strb w8, [sp, #49]2653; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #16]2654; NONEON-NOSVE-NEXT: cmp w8, #02655; NONEON-NOSVE-NEXT: cneg w8, w8, mi2656; NONEON-NOSVE-NEXT: strb w8, [sp, #48]2657; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #15]2658; NONEON-NOSVE-NEXT: cmp w8, #02659; NONEON-NOSVE-NEXT: cneg w8, w8, mi2660; NONEON-NOSVE-NEXT: strb w8, [sp, #47]2661; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #14]2662; NONEON-NOSVE-NEXT: cmp w8, #02663; NONEON-NOSVE-NEXT: cneg w8, w8, mi2664; NONEON-NOSVE-NEXT: strb w8, [sp, #46]2665; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #13]2666; NONEON-NOSVE-NEXT: cmp w8, #02667; NONEON-NOSVE-NEXT: cneg w8, w8, mi2668; NONEON-NOSVE-NEXT: strb w8, [sp, #45]2669; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #12]2670; NONEON-NOSVE-NEXT: cmp w8, #02671; NONEON-NOSVE-NEXT: cneg w8, w8, mi2672; NONEON-NOSVE-NEXT: strb w8, [sp, #44]2673; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #11]2674; NONEON-NOSVE-NEXT: cmp w8, #02675; NONEON-NOSVE-NEXT: cneg w8, w8, mi2676; NONEON-NOSVE-NEXT: strb w8, [sp, #43]2677; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #10]2678; NONEON-NOSVE-NEXT: cmp w8, #02679; NONEON-NOSVE-NEXT: cneg w8, w8, mi2680; NONEON-NOSVE-NEXT: strb w8, [sp, #42]2681; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #9]2682; NONEON-NOSVE-NEXT: cmp w8, #02683; NONEON-NOSVE-NEXT: cneg w8, w8, mi2684; NONEON-NOSVE-NEXT: strb w8, [sp, #41]2685; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #8]2686; NONEON-NOSVE-NEXT: cmp w8, #02687; NONEON-NOSVE-NEXT: cneg w8, w8, mi2688; NONEON-NOSVE-NEXT: strb w8, [sp, #40]2689; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #7]2690; NONEON-NOSVE-NEXT: cmp w8, #02691; NONEON-NOSVE-NEXT: cneg w8, w8, mi2692; NONEON-NOSVE-NEXT: strb w8, [sp, #39]2693; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #6]2694; NONEON-NOSVE-NEXT: cmp w8, #02695; NONEON-NOSVE-NEXT: cneg w8, w8, mi2696; NONEON-NOSVE-NEXT: strb w8, [sp, #38]2697; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #5]2698; NONEON-NOSVE-NEXT: cmp w8, #02699; NONEON-NOSVE-NEXT: cneg w8, w8, mi2700; NONEON-NOSVE-NEXT: strb w8, [sp, #37]2701; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #4]2702; NONEON-NOSVE-NEXT: cmp w8, #02703; NONEON-NOSVE-NEXT: cneg w8, w8, mi2704; NONEON-NOSVE-NEXT: strb w8, [sp, #36]2705; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #3]2706; NONEON-NOSVE-NEXT: cmp w8, #02707; NONEON-NOSVE-NEXT: cneg w8, w8, mi2708; NONEON-NOSVE-NEXT: strb w8, [sp, #35]2709; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #2]2710; NONEON-NOSVE-NEXT: cmp w8, #02711; NONEON-NOSVE-NEXT: cneg w8, w8, mi2712; NONEON-NOSVE-NEXT: strb w8, [sp, #34]2713; NONEON-NOSVE-NEXT: ldrsb w8, [sp, #1]2714; NONEON-NOSVE-NEXT: cmp w8, #02715; NONEON-NOSVE-NEXT: cneg w8, w8, mi2716; NONEON-NOSVE-NEXT: strb w8, [sp, #33]2717; NONEON-NOSVE-NEXT: ldrsb w8, [sp]2718; NONEON-NOSVE-NEXT: cmp w8, #02719; NONEON-NOSVE-NEXT: cneg w8, w8, mi2720; NONEON-NOSVE-NEXT: strb w8, [sp, #32]2721; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]2722; NONEON-NOSVE-NEXT: stp q0, q1, [x0]2723; NONEON-NOSVE-NEXT: add sp, sp, #642724; NONEON-NOSVE-NEXT: ret2725 %op1 = load <32 x i8>, ptr %a2726 %res = call <32 x i8> @llvm.abs.v32i8(<32 x i8> %op1, i1 false)2727 store <32 x i8> %res, ptr %a2728 ret void2729}2730 2731define <2 x i16> @abs_v2i16(<2 x i16> %op1) {2732; CHECK-LABEL: abs_v2i16:2733; CHECK: // %bb.0:2734; CHECK-NEXT: ptrue p0.s, vl22735; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02736; CHECK-NEXT: sxth z0.s, p0/m, z0.s2737; CHECK-NEXT: abs z0.s, p0/m, z0.s2738; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02739; CHECK-NEXT: ret2740;2741; NONEON-NOSVE-LABEL: abs_v2i16:2742; NONEON-NOSVE: // %bb.0:2743; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!2744; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 162745; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #4]2746; NONEON-NOSVE-NEXT: ldrsh w9, [sp]2747; NONEON-NOSVE-NEXT: cmp w8, #02748; NONEON-NOSVE-NEXT: cneg w8, w8, mi2749; NONEON-NOSVE-NEXT: cmp w9, #02750; NONEON-NOSVE-NEXT: cneg w9, w9, mi2751; NONEON-NOSVE-NEXT: stp w9, w8, [sp, #8]2752; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]2753; NONEON-NOSVE-NEXT: add sp, sp, #162754; NONEON-NOSVE-NEXT: ret2755 %res = call <2 x i16> @llvm.abs.v2i16(<2 x i16> %op1, i1 false)2756 ret <2 x i16> %res2757}2758 2759define <4 x i16> @abs_v4i16(<4 x i16> %op1) {2760; CHECK-LABEL: abs_v4i16:2761; CHECK: // %bb.0:2762; CHECK-NEXT: ptrue p0.h, vl42763; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02764; CHECK-NEXT: abs z0.h, p0/m, z0.h2765; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02766; CHECK-NEXT: ret2767;2768; NONEON-NOSVE-LABEL: abs_v4i16:2769; NONEON-NOSVE: // %bb.0:2770; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!2771; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 162772; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #6]2773; NONEON-NOSVE-NEXT: cmp w8, #02774; NONEON-NOSVE-NEXT: cneg w8, w8, mi2775; NONEON-NOSVE-NEXT: strh w8, [sp, #14]2776; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #4]2777; NONEON-NOSVE-NEXT: cmp w8, #02778; NONEON-NOSVE-NEXT: cneg w8, w8, mi2779; NONEON-NOSVE-NEXT: strh w8, [sp, #12]2780; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #2]2781; NONEON-NOSVE-NEXT: cmp w8, #02782; NONEON-NOSVE-NEXT: cneg w8, w8, mi2783; NONEON-NOSVE-NEXT: strh w8, [sp, #10]2784; NONEON-NOSVE-NEXT: ldrsh w8, [sp]2785; NONEON-NOSVE-NEXT: cmp w8, #02786; NONEON-NOSVE-NEXT: cneg w8, w8, mi2787; NONEON-NOSVE-NEXT: strh w8, [sp, #8]2788; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]2789; NONEON-NOSVE-NEXT: add sp, sp, #162790; NONEON-NOSVE-NEXT: ret2791 %res = call <4 x i16> @llvm.abs.v4i16(<4 x i16> %op1, i1 false)2792 ret <4 x i16> %res2793}2794 2795define <8 x i16> @abs_v8i16(<8 x i16> %op1) {2796; CHECK-LABEL: abs_v8i16:2797; CHECK: // %bb.0:2798; CHECK-NEXT: ptrue p0.h, vl82799; CHECK-NEXT: // kill: def $q0 killed $q0 def $z02800; CHECK-NEXT: abs z0.h, p0/m, z0.h2801; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z02802; CHECK-NEXT: ret2803;2804; NONEON-NOSVE-LABEL: abs_v8i16:2805; NONEON-NOSVE: // %bb.0:2806; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!2807; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 322808; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #14]2809; NONEON-NOSVE-NEXT: cmp w8, #02810; NONEON-NOSVE-NEXT: cneg w8, w8, mi2811; NONEON-NOSVE-NEXT: strh w8, [sp, #30]2812; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #12]2813; NONEON-NOSVE-NEXT: cmp w8, #02814; NONEON-NOSVE-NEXT: cneg w8, w8, mi2815; NONEON-NOSVE-NEXT: strh w8, [sp, #28]2816; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #10]2817; NONEON-NOSVE-NEXT: cmp w8, #02818; NONEON-NOSVE-NEXT: cneg w8, w8, mi2819; NONEON-NOSVE-NEXT: strh w8, [sp, #26]2820; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #8]2821; NONEON-NOSVE-NEXT: cmp w8, #02822; NONEON-NOSVE-NEXT: cneg w8, w8, mi2823; NONEON-NOSVE-NEXT: strh w8, [sp, #24]2824; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #6]2825; NONEON-NOSVE-NEXT: cmp w8, #02826; NONEON-NOSVE-NEXT: cneg w8, w8, mi2827; NONEON-NOSVE-NEXT: strh w8, [sp, #22]2828; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #4]2829; NONEON-NOSVE-NEXT: cmp w8, #02830; NONEON-NOSVE-NEXT: cneg w8, w8, mi2831; NONEON-NOSVE-NEXT: strh w8, [sp, #20]2832; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #2]2833; NONEON-NOSVE-NEXT: cmp w8, #02834; NONEON-NOSVE-NEXT: cneg w8, w8, mi2835; NONEON-NOSVE-NEXT: strh w8, [sp, #18]2836; NONEON-NOSVE-NEXT: ldrsh w8, [sp]2837; NONEON-NOSVE-NEXT: cmp w8, #02838; NONEON-NOSVE-NEXT: cneg w8, w8, mi2839; NONEON-NOSVE-NEXT: strh w8, [sp, #16]2840; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]2841; NONEON-NOSVE-NEXT: add sp, sp, #322842; NONEON-NOSVE-NEXT: ret2843 %res = call <8 x i16> @llvm.abs.v8i16(<8 x i16> %op1, i1 false)2844 ret <8 x i16> %res2845}2846 2847define void @abs_v16i16(ptr %a) {2848; CHECK-LABEL: abs_v16i16:2849; CHECK: // %bb.0:2850; CHECK-NEXT: ldp q0, q1, [x0]2851; CHECK-NEXT: ptrue p0.h, vl82852; CHECK-NEXT: abs z0.h, p0/m, z0.h2853; CHECK-NEXT: abs z1.h, p0/m, z1.h2854; CHECK-NEXT: stp q0, q1, [x0]2855; CHECK-NEXT: ret2856;2857; NONEON-NOSVE-LABEL: abs_v16i16:2858; NONEON-NOSVE: // %bb.0:2859; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]2860; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!2861; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 642862; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #30]2863; NONEON-NOSVE-NEXT: cmp w8, #02864; NONEON-NOSVE-NEXT: cneg w8, w8, mi2865; NONEON-NOSVE-NEXT: strh w8, [sp, #62]2866; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #28]2867; NONEON-NOSVE-NEXT: cmp w8, #02868; NONEON-NOSVE-NEXT: cneg w8, w8, mi2869; NONEON-NOSVE-NEXT: strh w8, [sp, #60]2870; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #26]2871; NONEON-NOSVE-NEXT: cmp w8, #02872; NONEON-NOSVE-NEXT: cneg w8, w8, mi2873; NONEON-NOSVE-NEXT: strh w8, [sp, #58]2874; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #24]2875; NONEON-NOSVE-NEXT: cmp w8, #02876; NONEON-NOSVE-NEXT: cneg w8, w8, mi2877; NONEON-NOSVE-NEXT: strh w8, [sp, #56]2878; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]2879; NONEON-NOSVE-NEXT: cmp w8, #02880; NONEON-NOSVE-NEXT: cneg w8, w8, mi2881; NONEON-NOSVE-NEXT: strh w8, [sp, #54]2882; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]2883; NONEON-NOSVE-NEXT: cmp w8, #02884; NONEON-NOSVE-NEXT: cneg w8, w8, mi2885; NONEON-NOSVE-NEXT: strh w8, [sp, #52]2886; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]2887; NONEON-NOSVE-NEXT: cmp w8, #02888; NONEON-NOSVE-NEXT: cneg w8, w8, mi2889; NONEON-NOSVE-NEXT: strh w8, [sp, #50]2890; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]2891; NONEON-NOSVE-NEXT: cmp w8, #02892; NONEON-NOSVE-NEXT: cneg w8, w8, mi2893; NONEON-NOSVE-NEXT: strh w8, [sp, #48]2894; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #14]2895; NONEON-NOSVE-NEXT: cmp w8, #02896; NONEON-NOSVE-NEXT: cneg w8, w8, mi2897; NONEON-NOSVE-NEXT: strh w8, [sp, #46]2898; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #12]2899; NONEON-NOSVE-NEXT: cmp w8, #02900; NONEON-NOSVE-NEXT: cneg w8, w8, mi2901; NONEON-NOSVE-NEXT: strh w8, [sp, #44]2902; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #10]2903; NONEON-NOSVE-NEXT: cmp w8, #02904; NONEON-NOSVE-NEXT: cneg w8, w8, mi2905; NONEON-NOSVE-NEXT: strh w8, [sp, #42]2906; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #8]2907; NONEON-NOSVE-NEXT: cmp w8, #02908; NONEON-NOSVE-NEXT: cneg w8, w8, mi2909; NONEON-NOSVE-NEXT: strh w8, [sp, #40]2910; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #6]2911; NONEON-NOSVE-NEXT: cmp w8, #02912; NONEON-NOSVE-NEXT: cneg w8, w8, mi2913; NONEON-NOSVE-NEXT: strh w8, [sp, #38]2914; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #4]2915; NONEON-NOSVE-NEXT: cmp w8, #02916; NONEON-NOSVE-NEXT: cneg w8, w8, mi2917; NONEON-NOSVE-NEXT: strh w8, [sp, #36]2918; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #2]2919; NONEON-NOSVE-NEXT: cmp w8, #02920; NONEON-NOSVE-NEXT: cneg w8, w8, mi2921; NONEON-NOSVE-NEXT: strh w8, [sp, #34]2922; NONEON-NOSVE-NEXT: ldrsh w8, [sp]2923; NONEON-NOSVE-NEXT: cmp w8, #02924; NONEON-NOSVE-NEXT: cneg w8, w8, mi2925; NONEON-NOSVE-NEXT: strh w8, [sp, #32]2926; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]2927; NONEON-NOSVE-NEXT: stp q0, q1, [x0]2928; NONEON-NOSVE-NEXT: add sp, sp, #642929; NONEON-NOSVE-NEXT: ret2930 %op1 = load <16 x i16>, ptr %a2931 %res = call <16 x i16> @llvm.abs.v16i16(<16 x i16> %op1, i1 false)2932 store <16 x i16> %res, ptr %a2933 ret void2934}2935 2936define <2 x i32> @abs_v2i32(<2 x i32> %op1) {2937; CHECK-LABEL: abs_v2i32:2938; CHECK: // %bb.0:2939; CHECK-NEXT: ptrue p0.s, vl22940; CHECK-NEXT: // kill: def $d0 killed $d0 def $z02941; CHECK-NEXT: abs z0.s, p0/m, z0.s2942; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z02943; CHECK-NEXT: ret2944;2945; NONEON-NOSVE-LABEL: abs_v2i32:2946; NONEON-NOSVE: // %bb.0:2947; NONEON-NOSVE-NEXT: str d0, [sp, #-16]!2948; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 162949; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]2950; NONEON-NOSVE-NEXT: cmp w8, #02951; NONEON-NOSVE-NEXT: cneg w9, w8, mi2952; NONEON-NOSVE-NEXT: ldr w8, [sp]2953; NONEON-NOSVE-NEXT: cmp w8, #02954; NONEON-NOSVE-NEXT: cneg w8, w8, mi2955; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #8]2956; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]2957; NONEON-NOSVE-NEXT: add sp, sp, #162958; NONEON-NOSVE-NEXT: ret2959 %res = call <2 x i32> @llvm.abs.v2i32(<2 x i32> %op1, i1 false)2960 ret <2 x i32> %res2961}2962 2963define <4 x i32> @abs_v4i32(<4 x i32> %op1) {2964; CHECK-LABEL: abs_v4i32:2965; CHECK: // %bb.0:2966; CHECK-NEXT: ptrue p0.s, vl42967; CHECK-NEXT: // kill: def $q0 killed $q0 def $z02968; CHECK-NEXT: abs z0.s, p0/m, z0.s2969; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z02970; CHECK-NEXT: ret2971;2972; NONEON-NOSVE-LABEL: abs_v4i32:2973; NONEON-NOSVE: // %bb.0:2974; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!2975; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 322976; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]2977; NONEON-NOSVE-NEXT: cmp w8, #02978; NONEON-NOSVE-NEXT: cneg w9, w8, mi2979; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]2980; NONEON-NOSVE-NEXT: cmp w8, #02981; NONEON-NOSVE-NEXT: cneg w8, w8, mi2982; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #24]2983; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]2984; NONEON-NOSVE-NEXT: cmp w8, #02985; NONEON-NOSVE-NEXT: cneg w9, w8, mi2986; NONEON-NOSVE-NEXT: ldr w8, [sp]2987; NONEON-NOSVE-NEXT: cmp w8, #02988; NONEON-NOSVE-NEXT: cneg w8, w8, mi2989; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #16]2990; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]2991; NONEON-NOSVE-NEXT: add sp, sp, #322992; NONEON-NOSVE-NEXT: ret2993 %res = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %op1, i1 false)2994 ret <4 x i32> %res2995}2996 2997define void @abs_v8i32(ptr %a) {2998; CHECK-LABEL: abs_v8i32:2999; CHECK: // %bb.0:3000; CHECK-NEXT: ldp q0, q1, [x0]3001; CHECK-NEXT: ptrue p0.s, vl43002; CHECK-NEXT: abs z0.s, p0/m, z0.s3003; CHECK-NEXT: abs z1.s, p0/m, z1.s3004; CHECK-NEXT: stp q0, q1, [x0]3005; CHECK-NEXT: ret3006;3007; NONEON-NOSVE-LABEL: abs_v8i32:3008; NONEON-NOSVE: // %bb.0:3009; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]3010; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!3011; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 643012; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]3013; NONEON-NOSVE-NEXT: cmp w8, #03014; NONEON-NOSVE-NEXT: cneg w9, w8, mi3015; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]3016; NONEON-NOSVE-NEXT: cmp w8, #03017; NONEON-NOSVE-NEXT: cneg w8, w8, mi3018; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #56]3019; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]3020; NONEON-NOSVE-NEXT: cmp w8, #03021; NONEON-NOSVE-NEXT: cneg w9, w8, mi3022; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]3023; NONEON-NOSVE-NEXT: cmp w8, #03024; NONEON-NOSVE-NEXT: cneg w8, w8, mi3025; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #48]3026; NONEON-NOSVE-NEXT: ldr w8, [sp, #12]3027; NONEON-NOSVE-NEXT: cmp w8, #03028; NONEON-NOSVE-NEXT: cneg w9, w8, mi3029; NONEON-NOSVE-NEXT: ldr w8, [sp, #8]3030; NONEON-NOSVE-NEXT: cmp w8, #03031; NONEON-NOSVE-NEXT: cneg w8, w8, mi3032; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #40]3033; NONEON-NOSVE-NEXT: ldr w8, [sp, #4]3034; NONEON-NOSVE-NEXT: cmp w8, #03035; NONEON-NOSVE-NEXT: cneg w9, w8, mi3036; NONEON-NOSVE-NEXT: ldr w8, [sp]3037; NONEON-NOSVE-NEXT: cmp w8, #03038; NONEON-NOSVE-NEXT: cneg w8, w8, mi3039; NONEON-NOSVE-NEXT: stp w8, w9, [sp, #32]3040; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]3041; NONEON-NOSVE-NEXT: stp q0, q1, [x0]3042; NONEON-NOSVE-NEXT: add sp, sp, #643043; NONEON-NOSVE-NEXT: ret3044 %op1 = load <8 x i32>, ptr %a3045 %res = call <8 x i32> @llvm.abs.v8i32(<8 x i32> %op1, i1 false)3046 store <8 x i32> %res, ptr %a3047 ret void3048}3049 3050define <1 x i64> @abs_v1i64(<1 x i64> %op1) {3051; CHECK-LABEL: abs_v1i64:3052; CHECK: // %bb.0:3053; CHECK-NEXT: ptrue p0.d, vl13054; CHECK-NEXT: // kill: def $d0 killed $d0 def $z03055; CHECK-NEXT: abs z0.d, p0/m, z0.d3056; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z03057; CHECK-NEXT: ret3058;3059; NONEON-NOSVE-LABEL: abs_v1i64:3060; NONEON-NOSVE: // %bb.0:3061; NONEON-NOSVE-NEXT: sub sp, sp, #163062; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 163063; NONEON-NOSVE-NEXT: fmov x8, d03064; NONEON-NOSVE-NEXT: cmp x8, #03065; NONEON-NOSVE-NEXT: cneg x8, x8, mi3066; NONEON-NOSVE-NEXT: str x8, [sp, #8]3067; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]3068; NONEON-NOSVE-NEXT: add sp, sp, #163069; NONEON-NOSVE-NEXT: ret3070 %res = call <1 x i64> @llvm.abs.v1i64(<1 x i64> %op1, i1 false)3071 ret <1 x i64> %res3072}3073 3074define <2 x i64> @abs_v2i64(<2 x i64> %op1) {3075; CHECK-LABEL: abs_v2i64:3076; CHECK: // %bb.0:3077; CHECK-NEXT: ptrue p0.d, vl23078; CHECK-NEXT: // kill: def $q0 killed $q0 def $z03079; CHECK-NEXT: abs z0.d, p0/m, z0.d3080; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z03081; CHECK-NEXT: ret3082;3083; NONEON-NOSVE-LABEL: abs_v2i64:3084; NONEON-NOSVE: // %bb.0:3085; NONEON-NOSVE-NEXT: str q0, [sp, #-32]!3086; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 323087; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]3088; NONEON-NOSVE-NEXT: cmp x8, #03089; NONEON-NOSVE-NEXT: cneg x9, x8, mi3090; NONEON-NOSVE-NEXT: ldr x8, [sp]3091; NONEON-NOSVE-NEXT: cmp x8, #03092; NONEON-NOSVE-NEXT: cneg x8, x8, mi3093; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #16]3094; NONEON-NOSVE-NEXT: ldr q0, [sp, #16]3095; NONEON-NOSVE-NEXT: add sp, sp, #323096; NONEON-NOSVE-NEXT: ret3097 %res = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %op1, i1 false)3098 ret <2 x i64> %res3099}3100 3101define void @abs_v4i64(ptr %a) {3102; CHECK-LABEL: abs_v4i64:3103; CHECK: // %bb.0:3104; CHECK-NEXT: ldp q0, q1, [x0]3105; CHECK-NEXT: ptrue p0.d, vl23106; CHECK-NEXT: abs z0.d, p0/m, z0.d3107; CHECK-NEXT: abs z1.d, p0/m, z1.d3108; CHECK-NEXT: stp q0, q1, [x0]3109; CHECK-NEXT: ret3110;3111; NONEON-NOSVE-LABEL: abs_v4i64:3112; NONEON-NOSVE: // %bb.0:3113; NONEON-NOSVE-NEXT: ldp q1, q0, [x0]3114; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-64]!3115; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 643116; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]3117; NONEON-NOSVE-NEXT: cmp x8, #03118; NONEON-NOSVE-NEXT: cneg x9, x8, mi3119; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]3120; NONEON-NOSVE-NEXT: cmp x8, #03121; NONEON-NOSVE-NEXT: cneg x8, x8, mi3122; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #48]3123; NONEON-NOSVE-NEXT: ldr x8, [sp, #8]3124; NONEON-NOSVE-NEXT: cmp x8, #03125; NONEON-NOSVE-NEXT: cneg x9, x8, mi3126; NONEON-NOSVE-NEXT: ldr x8, [sp]3127; NONEON-NOSVE-NEXT: cmp x8, #03128; NONEON-NOSVE-NEXT: cneg x8, x8, mi3129; NONEON-NOSVE-NEXT: stp x8, x9, [sp, #32]3130; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #32]3131; NONEON-NOSVE-NEXT: stp q0, q1, [x0]3132; NONEON-NOSVE-NEXT: add sp, sp, #643133; NONEON-NOSVE-NEXT: ret3134 %op1 = load <4 x i64>, ptr %a3135 %res = call <4 x i64> @llvm.abs.v4i64(<4 x i64> %op1, i1 false)3136 store <4 x i64> %res, ptr %a3137 ret void3138}3139 3140declare <4 x i8> @llvm.abs.v4i8(<4 x i8>, i1)3141declare <8 x i8> @llvm.abs.v8i8(<8 x i8>, i1)3142declare <16 x i8> @llvm.abs.v16i8(<16 x i8>, i1)3143declare <32 x i8> @llvm.abs.v32i8(<32 x i8>, i1)3144declare <4 x i16> @llvm.abs.v4i16(<4 x i16>, i1)3145declare <2 x i16> @llvm.abs.v2i16(<2 x i16>, i1)3146declare <8 x i16> @llvm.abs.v8i16(<8 x i16>, i1)3147declare <16 x i16> @llvm.abs.v16i16(<16 x i16>, i1)3148declare <2 x i32> @llvm.abs.v2i32(<2 x i32>, i1)3149declare <4 x i32> @llvm.abs.v4i32(<4 x i32>, i1)3150declare <8 x i32> @llvm.abs.v8i32(<8 x i32>, i1)3151declare <1 x i64> @llvm.abs.v1i64(<1 x i64>, i1)3152declare <2 x i64> @llvm.abs.v2i64(<2 x i64>, i1)3153declare <4 x i64> @llvm.abs.v4i64(<4 x i64>, i1)3154 3155