1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s 3; RUN: llc -mattr=+sme -force-streaming < %s | FileCheck %s 4; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE 5 6target triple = "aarch64-unknown-linux-gnu" 7 8; 9; FMAXNM 10; 11 12define <4 x half> @fmaxnm_v4f16(<4 x half> %op1, <4 x half> %op2) { 13; CHECK-LABEL: fmaxnm_v4f16: 14; CHECK: // %bb.0: 15; CHECK-NEXT: ptrue p0.h, vl4 16; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 17; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 18; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, z1.h 19; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 20; CHECK-NEXT: ret 21; 22; NONEON-NOSVE-LABEL: fmaxnm_v4f16: 23; NONEON-NOSVE: // %bb.0: 24; NONEON-NOSVE-NEXT: sub sp, sp, #32 25; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 26; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 27; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 28; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 29; NONEON-NOSVE-NEXT: fcvt s0, h0 30; NONEON-NOSVE-NEXT: fcvt s1, h1 31; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 32; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 33; NONEON-NOSVE-NEXT: fcvt s1, h1 34; NONEON-NOSVE-NEXT: fcvt h0, s0 35; NONEON-NOSVE-NEXT: str h0, [sp, #30] 36; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 37; NONEON-NOSVE-NEXT: fcvt s0, h0 38; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 39; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 40; NONEON-NOSVE-NEXT: fcvt s1, h1 41; NONEON-NOSVE-NEXT: fcvt h0, s0 42; NONEON-NOSVE-NEXT: str h0, [sp, #28] 43; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 44; NONEON-NOSVE-NEXT: fcvt s0, h0 45; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 46; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 47; NONEON-NOSVE-NEXT: fcvt s1, h1 48; NONEON-NOSVE-NEXT: fcvt h0, s0 49; NONEON-NOSVE-NEXT: str h0, [sp, #26] 50; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 51; NONEON-NOSVE-NEXT: fcvt s0, h0 52; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 53; NONEON-NOSVE-NEXT: fcvt h0, s0 54; NONEON-NOSVE-NEXT: str h0, [sp, #24] 55; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 56; NONEON-NOSVE-NEXT: add sp, sp, #32 57; NONEON-NOSVE-NEXT: ret 58 %res = call <4 x half> @llvm.maxnum.v4f16(<4 x half> %op1, <4 x half> %op2) 59 ret <4 x half> %res 60} 61 62define <8 x half> @fmaxnm_v8f16(<8 x half> %op1, <8 x half> %op2) { 63; CHECK-LABEL: fmaxnm_v8f16: 64; CHECK: // %bb.0: 65; CHECK-NEXT: ptrue p0.h, vl8 66; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 67; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 68; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, z1.h 69; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 70; CHECK-NEXT: ret 71; 72; NONEON-NOSVE-LABEL: fmaxnm_v8f16: 73; NONEON-NOSVE: // %bb.0: 74; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 75; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 76; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 77; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 78; NONEON-NOSVE-NEXT: fcvt s0, h0 79; NONEON-NOSVE-NEXT: fcvt s1, h1 80; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 81; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 82; NONEON-NOSVE-NEXT: fcvt s1, h1 83; NONEON-NOSVE-NEXT: fcvt h0, s0 84; NONEON-NOSVE-NEXT: str h0, [sp, #46] 85; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 86; NONEON-NOSVE-NEXT: fcvt s0, h0 87; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 88; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 89; NONEON-NOSVE-NEXT: fcvt s1, h1 90; NONEON-NOSVE-NEXT: fcvt h0, s0 91; NONEON-NOSVE-NEXT: str h0, [sp, #44] 92; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 93; NONEON-NOSVE-NEXT: fcvt s0, h0 94; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 95; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 96; NONEON-NOSVE-NEXT: fcvt s1, h1 97; NONEON-NOSVE-NEXT: fcvt h0, s0 98; NONEON-NOSVE-NEXT: str h0, [sp, #42] 99; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 100; NONEON-NOSVE-NEXT: fcvt s0, h0 101; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 102; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 103; NONEON-NOSVE-NEXT: fcvt s1, h1 104; NONEON-NOSVE-NEXT: fcvt h0, s0 105; NONEON-NOSVE-NEXT: str h0, [sp, #40] 106; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 107; NONEON-NOSVE-NEXT: fcvt s0, h0 108; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 109; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 110; NONEON-NOSVE-NEXT: fcvt s1, h1 111; NONEON-NOSVE-NEXT: fcvt h0, s0 112; NONEON-NOSVE-NEXT: str h0, [sp, #38] 113; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 114; NONEON-NOSVE-NEXT: fcvt s0, h0 115; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 116; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 117; NONEON-NOSVE-NEXT: fcvt s1, h1 118; NONEON-NOSVE-NEXT: fcvt h0, s0 119; NONEON-NOSVE-NEXT: str h0, [sp, #36] 120; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 121; NONEON-NOSVE-NEXT: fcvt s0, h0 122; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 123; NONEON-NOSVE-NEXT: ldr h1, [sp] 124; NONEON-NOSVE-NEXT: fcvt s1, h1 125; NONEON-NOSVE-NEXT: fcvt h0, s0 126; NONEON-NOSVE-NEXT: str h0, [sp, #34] 127; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 128; NONEON-NOSVE-NEXT: fcvt s0, h0 129; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 130; NONEON-NOSVE-NEXT: fcvt h0, s0 131; NONEON-NOSVE-NEXT: str h0, [sp, #32] 132; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 133; NONEON-NOSVE-NEXT: add sp, sp, #48 134; NONEON-NOSVE-NEXT: ret 135 %res = call <8 x half> @llvm.maxnum.v8f16(<8 x half> %op1, <8 x half> %op2) 136 ret <8 x half> %res 137} 138 139define void @fmaxnm_v16f16(ptr %a, ptr %b) { 140; CHECK-LABEL: fmaxnm_v16f16: 141; CHECK: // %bb.0: 142; CHECK-NEXT: ldp q0, q3, [x1] 143; CHECK-NEXT: ptrue p0.h, vl8 144; CHECK-NEXT: ldp q1, q2, [x0] 145; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, z1.h 146; CHECK-NEXT: movprfx z1, z2 147; CHECK-NEXT: fmaxnm z1.h, p0/m, z1.h, z3.h 148; CHECK-NEXT: stp q0, q1, [x0] 149; CHECK-NEXT: ret 150; 151; NONEON-NOSVE-LABEL: fmaxnm_v16f16: 152; NONEON-NOSVE: // %bb.0: 153; NONEON-NOSVE-NEXT: sub sp, sp, #96 154; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 155; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 156; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 157; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 158; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 159; NONEON-NOSVE-NEXT: ldr h0, [sp, #62] 160; NONEON-NOSVE-NEXT: ldr h1, [sp, #46] 161; NONEON-NOSVE-NEXT: fcvt s0, h0 162; NONEON-NOSVE-NEXT: fcvt s1, h1 163; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 164; NONEON-NOSVE-NEXT: ldr h1, [sp, #44] 165; NONEON-NOSVE-NEXT: fcvt s1, h1 166; NONEON-NOSVE-NEXT: fcvt h0, s0 167; NONEON-NOSVE-NEXT: str h0, [sp, #94] 168; NONEON-NOSVE-NEXT: ldr h0, [sp, #60] 169; NONEON-NOSVE-NEXT: fcvt s0, h0 170; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 171; NONEON-NOSVE-NEXT: ldr h1, [sp, #42] 172; NONEON-NOSVE-NEXT: fcvt s1, h1 173; NONEON-NOSVE-NEXT: fcvt h0, s0 174; NONEON-NOSVE-NEXT: str h0, [sp, #92] 175; NONEON-NOSVE-NEXT: ldr h0, [sp, #58] 176; NONEON-NOSVE-NEXT: fcvt s0, h0 177; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 178; NONEON-NOSVE-NEXT: ldr h1, [sp, #40] 179; NONEON-NOSVE-NEXT: fcvt s1, h1 180; NONEON-NOSVE-NEXT: fcvt h0, s0 181; NONEON-NOSVE-NEXT: str h0, [sp, #90] 182; NONEON-NOSVE-NEXT: ldr h0, [sp, #56] 183; NONEON-NOSVE-NEXT: fcvt s0, h0 184; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 185; NONEON-NOSVE-NEXT: ldr h1, [sp, #38] 186; NONEON-NOSVE-NEXT: fcvt s1, h1 187; NONEON-NOSVE-NEXT: fcvt h0, s0 188; NONEON-NOSVE-NEXT: str h0, [sp, #88] 189; NONEON-NOSVE-NEXT: ldr h0, [sp, #54] 190; NONEON-NOSVE-NEXT: fcvt s0, h0 191; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 192; NONEON-NOSVE-NEXT: ldr h1, [sp, #36] 193; NONEON-NOSVE-NEXT: fcvt s1, h1 194; NONEON-NOSVE-NEXT: fcvt h0, s0 195; NONEON-NOSVE-NEXT: str h0, [sp, #86] 196; NONEON-NOSVE-NEXT: ldr h0, [sp, #52] 197; NONEON-NOSVE-NEXT: fcvt s0, h0 198; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 199; NONEON-NOSVE-NEXT: ldr h1, [sp, #34] 200; NONEON-NOSVE-NEXT: fcvt s1, h1 201; NONEON-NOSVE-NEXT: fcvt h0, s0 202; NONEON-NOSVE-NEXT: str h0, [sp, #84] 203; NONEON-NOSVE-NEXT: ldr h0, [sp, #50] 204; NONEON-NOSVE-NEXT: fcvt s0, h0 205; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 206; NONEON-NOSVE-NEXT: ldr h1, [sp, #32] 207; NONEON-NOSVE-NEXT: fcvt s1, h1 208; NONEON-NOSVE-NEXT: fcvt h0, s0 209; NONEON-NOSVE-NEXT: str h0, [sp, #82] 210; NONEON-NOSVE-NEXT: ldr h0, [sp, #48] 211; NONEON-NOSVE-NEXT: fcvt s0, h0 212; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 213; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 214; NONEON-NOSVE-NEXT: fcvt s1, h1 215; NONEON-NOSVE-NEXT: fcvt h0, s0 216; NONEON-NOSVE-NEXT: str h0, [sp, #80] 217; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 218; NONEON-NOSVE-NEXT: fcvt s0, h0 219; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 220; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 221; NONEON-NOSVE-NEXT: fcvt s1, h1 222; NONEON-NOSVE-NEXT: fcvt h0, s0 223; NONEON-NOSVE-NEXT: str h0, [sp, #78] 224; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 225; NONEON-NOSVE-NEXT: fcvt s0, h0 226; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 227; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 228; NONEON-NOSVE-NEXT: fcvt s1, h1 229; NONEON-NOSVE-NEXT: fcvt h0, s0 230; NONEON-NOSVE-NEXT: str h0, [sp, #76] 231; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 232; NONEON-NOSVE-NEXT: fcvt s0, h0 233; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 234; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 235; NONEON-NOSVE-NEXT: fcvt s1, h1 236; NONEON-NOSVE-NEXT: fcvt h0, s0 237; NONEON-NOSVE-NEXT: str h0, [sp, #74] 238; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 239; NONEON-NOSVE-NEXT: fcvt s0, h0 240; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 241; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 242; NONEON-NOSVE-NEXT: fcvt s1, h1 243; NONEON-NOSVE-NEXT: fcvt h0, s0 244; NONEON-NOSVE-NEXT: str h0, [sp, #72] 245; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 246; NONEON-NOSVE-NEXT: fcvt s0, h0 247; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 248; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 249; NONEON-NOSVE-NEXT: fcvt s1, h1 250; NONEON-NOSVE-NEXT: fcvt h0, s0 251; NONEON-NOSVE-NEXT: str h0, [sp, #70] 252; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 253; NONEON-NOSVE-NEXT: fcvt s0, h0 254; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 255; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 256; NONEON-NOSVE-NEXT: fcvt s1, h1 257; NONEON-NOSVE-NEXT: fcvt h0, s0 258; NONEON-NOSVE-NEXT: str h0, [sp, #68] 259; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 260; NONEON-NOSVE-NEXT: fcvt s0, h0 261; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 262; NONEON-NOSVE-NEXT: ldr h1, [sp] 263; NONEON-NOSVE-NEXT: fcvt s1, h1 264; NONEON-NOSVE-NEXT: fcvt h0, s0 265; NONEON-NOSVE-NEXT: str h0, [sp, #66] 266; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 267; NONEON-NOSVE-NEXT: fcvt s0, h0 268; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 269; NONEON-NOSVE-NEXT: fcvt h0, s0 270; NONEON-NOSVE-NEXT: str h0, [sp, #64] 271; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 272; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 273; NONEON-NOSVE-NEXT: add sp, sp, #96 274; NONEON-NOSVE-NEXT: ret 275 %op1 = load <16 x half>, ptr %a 276 %op2 = load <16 x half>, ptr %b 277 %res = call <16 x half> @llvm.maxnum.v16f16(<16 x half> %op1, <16 x half> %op2) 278 store <16 x half> %res, ptr %a 279 ret void 280} 281 282define <2 x float> @fmaxnm_v2f32(<2 x float> %op1, <2 x float> %op2) { 283; CHECK-LABEL: fmaxnm_v2f32: 284; CHECK: // %bb.0: 285; CHECK-NEXT: ptrue p0.s, vl2 286; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 287; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 288; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, z1.s 289; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 290; CHECK-NEXT: ret 291; 292; NONEON-NOSVE-LABEL: fmaxnm_v2f32: 293; NONEON-NOSVE: // %bb.0: 294; NONEON-NOSVE-NEXT: sub sp, sp, #32 295; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 296; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 297; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 298; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 299; NONEON-NOSVE-NEXT: fmaxnm s3, s2, s0 300; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 301; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 302; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #24] 303; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 304; NONEON-NOSVE-NEXT: add sp, sp, #32 305; NONEON-NOSVE-NEXT: ret 306 %res = call <2 x float> @llvm.maxnum.v2f32(<2 x float> %op1, <2 x float> %op2) 307 ret <2 x float> %res 308} 309 310define <4 x float> @fmaxnm_v4f32(<4 x float> %op1, <4 x float> %op2) { 311; CHECK-LABEL: fmaxnm_v4f32: 312; CHECK: // %bb.0: 313; CHECK-NEXT: ptrue p0.s, vl4 314; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 315; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 316; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, z1.s 317; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 318; CHECK-NEXT: ret 319; 320; NONEON-NOSVE-LABEL: fmaxnm_v4f32: 321; NONEON-NOSVE: // %bb.0: 322; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 323; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 324; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 325; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 326; NONEON-NOSVE-NEXT: fmaxnm s3, s2, s0 327; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 328; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 329; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 330; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #40] 331; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 332; NONEON-NOSVE-NEXT: fmaxnm s3, s2, s0 333; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 334; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 335; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #32] 336; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 337; NONEON-NOSVE-NEXT: add sp, sp, #48 338; NONEON-NOSVE-NEXT: ret 339 %res = call <4 x float> @llvm.maxnum.v4f32(<4 x float> %op1, <4 x float> %op2) 340 ret <4 x float> %res 341} 342 343define void @fmaxnm_v8f32(ptr %a, ptr %b) { 344; CHECK-LABEL: fmaxnm_v8f32: 345; CHECK: // %bb.0: 346; CHECK-NEXT: ldp q0, q3, [x1] 347; CHECK-NEXT: ptrue p0.s, vl4 348; CHECK-NEXT: ldp q1, q2, [x0] 349; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, z1.s 350; CHECK-NEXT: movprfx z1, z2 351; CHECK-NEXT: fmaxnm z1.s, p0/m, z1.s, z3.s 352; CHECK-NEXT: stp q0, q1, [x0] 353; CHECK-NEXT: ret 354; 355; NONEON-NOSVE-LABEL: fmaxnm_v8f32: 356; NONEON-NOSVE: // %bb.0: 357; NONEON-NOSVE-NEXT: sub sp, sp, #96 358; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 359; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 360; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 361; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 362; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 363; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #40] 364; NONEON-NOSVE-NEXT: ldr s0, [sp, #60] 365; NONEON-NOSVE-NEXT: fmaxnm s3, s2, s0 366; NONEON-NOSVE-NEXT: ldr s0, [sp, #56] 367; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 368; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #32] 369; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #88] 370; NONEON-NOSVE-NEXT: ldr s0, [sp, #52] 371; NONEON-NOSVE-NEXT: fmaxnm s3, s2, s0 372; NONEON-NOSVE-NEXT: ldr s0, [sp, #48] 373; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 374; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 375; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #80] 376; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 377; NONEON-NOSVE-NEXT: fmaxnm s3, s2, s0 378; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 379; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 380; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 381; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #72] 382; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 383; NONEON-NOSVE-NEXT: fmaxnm s3, s2, s0 384; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 385; NONEON-NOSVE-NEXT: fmaxnm s0, s1, s0 386; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #64] 387; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 388; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 389; NONEON-NOSVE-NEXT: add sp, sp, #96 390; NONEON-NOSVE-NEXT: ret 391 %op1 = load <8 x float>, ptr %a 392 %op2 = load <8 x float>, ptr %b 393 %res = call <8 x float> @llvm.maxnum.v8f32(<8 x float> %op1, <8 x float> %op2) 394 store <8 x float> %res, ptr %a 395 ret void 396} 397 398define <1 x double> @fmaxnm_v1f64(<1 x double> %op1, <1 x double> %op2) { 399; CHECK-LABEL: fmaxnm_v1f64: 400; CHECK: // %bb.0: 401; CHECK-NEXT: fmaxnm d0, d0, d1 402; CHECK-NEXT: ret 403; 404; NONEON-NOSVE-LABEL: fmaxnm_v1f64: 405; NONEON-NOSVE: // %bb.0: 406; NONEON-NOSVE-NEXT: sub sp, sp, #16 407; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16 408; NONEON-NOSVE-NEXT: fmaxnm d0, d0, d1 409; NONEON-NOSVE-NEXT: str d0, [sp, #8] 410; NONEON-NOSVE-NEXT: ldr d0, [sp, #8] 411; NONEON-NOSVE-NEXT: add sp, sp, #16 412; NONEON-NOSVE-NEXT: ret 413 %res = call <1 x double> @llvm.maxnum.v1f64(<1 x double> %op1, <1 x double> %op2) 414 ret <1 x double> %res 415} 416 417define <2 x double> @fmaxnm_v2f64(<2 x double> %op1, <2 x double> %op2) { 418; CHECK-LABEL: fmaxnm_v2f64: 419; CHECK: // %bb.0: 420; CHECK-NEXT: ptrue p0.d, vl2 421; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 422; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 423; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, z1.d 424; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 425; CHECK-NEXT: ret 426; 427; NONEON-NOSVE-LABEL: fmaxnm_v2f64: 428; NONEON-NOSVE: // %bb.0: 429; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 430; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 431; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 432; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 433; NONEON-NOSVE-NEXT: fmaxnm d3, d2, d0 434; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 435; NONEON-NOSVE-NEXT: fmaxnm d0, d1, d0 436; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #32] 437; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 438; NONEON-NOSVE-NEXT: add sp, sp, #48 439; NONEON-NOSVE-NEXT: ret 440 %res = call <2 x double> @llvm.maxnum.v2f64(<2 x double> %op1, <2 x double> %op2) 441 ret <2 x double> %res 442} 443 444define void @fmaxnm_v4f64(ptr %a, ptr %b) { 445; CHECK-LABEL: fmaxnm_v4f64: 446; CHECK: // %bb.0: 447; CHECK-NEXT: ldp q0, q3, [x1] 448; CHECK-NEXT: ptrue p0.d, vl2 449; CHECK-NEXT: ldp q1, q2, [x0] 450; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, z1.d 451; CHECK-NEXT: movprfx z1, z2 452; CHECK-NEXT: fmaxnm z1.d, p0/m, z1.d, z3.d 453; CHECK-NEXT: stp q0, q1, [x0] 454; CHECK-NEXT: ret 455; 456; NONEON-NOSVE-LABEL: fmaxnm_v4f64: 457; NONEON-NOSVE: // %bb.0: 458; NONEON-NOSVE-NEXT: sub sp, sp, #96 459; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 460; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 461; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 462; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 463; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 464; NONEON-NOSVE-NEXT: ldp d1, d2, [sp, #32] 465; NONEON-NOSVE-NEXT: ldr d0, [sp, #56] 466; NONEON-NOSVE-NEXT: fmaxnm d3, d2, d0 467; NONEON-NOSVE-NEXT: ldr d0, [sp, #48] 468; NONEON-NOSVE-NEXT: fmaxnm d0, d1, d0 469; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 470; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #80] 471; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 472; NONEON-NOSVE-NEXT: fmaxnm d3, d2, d0 473; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 474; NONEON-NOSVE-NEXT: fmaxnm d0, d1, d0 475; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #64] 476; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 477; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 478; NONEON-NOSVE-NEXT: add sp, sp, #96 479; NONEON-NOSVE-NEXT: ret 480 %op1 = load <4 x double>, ptr %a 481 %op2 = load <4 x double>, ptr %b 482 %res = call <4 x double> @llvm.maxnum.v4f64(<4 x double> %op1, <4 x double> %op2) 483 store <4 x double> %res, ptr %a 484 ret void 485} 486 487; 488; FMINNM 489; 490 491define <4 x half> @fminnm_v4f16(<4 x half> %op1, <4 x half> %op2) { 492; CHECK-LABEL: fminnm_v4f16: 493; CHECK: // %bb.0: 494; CHECK-NEXT: ptrue p0.h, vl4 495; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 496; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 497; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, z1.h 498; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 499; CHECK-NEXT: ret 500; 501; NONEON-NOSVE-LABEL: fminnm_v4f16: 502; NONEON-NOSVE: // %bb.0: 503; NONEON-NOSVE-NEXT: sub sp, sp, #32 504; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 505; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 506; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 507; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 508; NONEON-NOSVE-NEXT: fcvt s0, h0 509; NONEON-NOSVE-NEXT: fcvt s1, h1 510; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 511; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 512; NONEON-NOSVE-NEXT: fcvt s1, h1 513; NONEON-NOSVE-NEXT: fcvt h0, s0 514; NONEON-NOSVE-NEXT: str h0, [sp, #30] 515; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 516; NONEON-NOSVE-NEXT: fcvt s0, h0 517; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 518; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 519; NONEON-NOSVE-NEXT: fcvt s1, h1 520; NONEON-NOSVE-NEXT: fcvt h0, s0 521; NONEON-NOSVE-NEXT: str h0, [sp, #28] 522; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 523; NONEON-NOSVE-NEXT: fcvt s0, h0 524; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 525; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 526; NONEON-NOSVE-NEXT: fcvt s1, h1 527; NONEON-NOSVE-NEXT: fcvt h0, s0 528; NONEON-NOSVE-NEXT: str h0, [sp, #26] 529; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 530; NONEON-NOSVE-NEXT: fcvt s0, h0 531; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 532; NONEON-NOSVE-NEXT: fcvt h0, s0 533; NONEON-NOSVE-NEXT: str h0, [sp, #24] 534; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 535; NONEON-NOSVE-NEXT: add sp, sp, #32 536; NONEON-NOSVE-NEXT: ret 537 %res = call <4 x half> @llvm.minnum.v4f16(<4 x half> %op1, <4 x half> %op2) 538 ret <4 x half> %res 539} 540 541define <8 x half> @fminnm_v8f16(<8 x half> %op1, <8 x half> %op2) { 542; CHECK-LABEL: fminnm_v8f16: 543; CHECK: // %bb.0: 544; CHECK-NEXT: ptrue p0.h, vl8 545; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 546; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 547; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, z1.h 548; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 549; CHECK-NEXT: ret 550; 551; NONEON-NOSVE-LABEL: fminnm_v8f16: 552; NONEON-NOSVE: // %bb.0: 553; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 554; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 555; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 556; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 557; NONEON-NOSVE-NEXT: fcvt s0, h0 558; NONEON-NOSVE-NEXT: fcvt s1, h1 559; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 560; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 561; NONEON-NOSVE-NEXT: fcvt s1, h1 562; NONEON-NOSVE-NEXT: fcvt h0, s0 563; NONEON-NOSVE-NEXT: str h0, [sp, #46] 564; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 565; NONEON-NOSVE-NEXT: fcvt s0, h0 566; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 567; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 568; NONEON-NOSVE-NEXT: fcvt s1, h1 569; NONEON-NOSVE-NEXT: fcvt h0, s0 570; NONEON-NOSVE-NEXT: str h0, [sp, #44] 571; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 572; NONEON-NOSVE-NEXT: fcvt s0, h0 573; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 574; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 575; NONEON-NOSVE-NEXT: fcvt s1, h1 576; NONEON-NOSVE-NEXT: fcvt h0, s0 577; NONEON-NOSVE-NEXT: str h0, [sp, #42] 578; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 579; NONEON-NOSVE-NEXT: fcvt s0, h0 580; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 581; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 582; NONEON-NOSVE-NEXT: fcvt s1, h1 583; NONEON-NOSVE-NEXT: fcvt h0, s0 584; NONEON-NOSVE-NEXT: str h0, [sp, #40] 585; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 586; NONEON-NOSVE-NEXT: fcvt s0, h0 587; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 588; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 589; NONEON-NOSVE-NEXT: fcvt s1, h1 590; NONEON-NOSVE-NEXT: fcvt h0, s0 591; NONEON-NOSVE-NEXT: str h0, [sp, #38] 592; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 593; NONEON-NOSVE-NEXT: fcvt s0, h0 594; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 595; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 596; NONEON-NOSVE-NEXT: fcvt s1, h1 597; NONEON-NOSVE-NEXT: fcvt h0, s0 598; NONEON-NOSVE-NEXT: str h0, [sp, #36] 599; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 600; NONEON-NOSVE-NEXT: fcvt s0, h0 601; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 602; NONEON-NOSVE-NEXT: ldr h1, [sp] 603; NONEON-NOSVE-NEXT: fcvt s1, h1 604; NONEON-NOSVE-NEXT: fcvt h0, s0 605; NONEON-NOSVE-NEXT: str h0, [sp, #34] 606; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 607; NONEON-NOSVE-NEXT: fcvt s0, h0 608; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 609; NONEON-NOSVE-NEXT: fcvt h0, s0 610; NONEON-NOSVE-NEXT: str h0, [sp, #32] 611; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 612; NONEON-NOSVE-NEXT: add sp, sp, #48 613; NONEON-NOSVE-NEXT: ret 614 %res = call <8 x half> @llvm.minnum.v8f16(<8 x half> %op1, <8 x half> %op2) 615 ret <8 x half> %res 616} 617 618define void @fminnm_v16f16(ptr %a, ptr %b) { 619; CHECK-LABEL: fminnm_v16f16: 620; CHECK: // %bb.0: 621; CHECK-NEXT: ldp q0, q3, [x1] 622; CHECK-NEXT: ptrue p0.h, vl8 623; CHECK-NEXT: ldp q1, q2, [x0] 624; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, z1.h 625; CHECK-NEXT: movprfx z1, z2 626; CHECK-NEXT: fminnm z1.h, p0/m, z1.h, z3.h 627; CHECK-NEXT: stp q0, q1, [x0] 628; CHECK-NEXT: ret 629; 630; NONEON-NOSVE-LABEL: fminnm_v16f16: 631; NONEON-NOSVE: // %bb.0: 632; NONEON-NOSVE-NEXT: sub sp, sp, #96 633; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 634; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 635; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 636; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 637; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 638; NONEON-NOSVE-NEXT: ldr h0, [sp, #62] 639; NONEON-NOSVE-NEXT: ldr h1, [sp, #46] 640; NONEON-NOSVE-NEXT: fcvt s0, h0 641; NONEON-NOSVE-NEXT: fcvt s1, h1 642; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 643; NONEON-NOSVE-NEXT: ldr h1, [sp, #44] 644; NONEON-NOSVE-NEXT: fcvt s1, h1 645; NONEON-NOSVE-NEXT: fcvt h0, s0 646; NONEON-NOSVE-NEXT: str h0, [sp, #94] 647; NONEON-NOSVE-NEXT: ldr h0, [sp, #60] 648; NONEON-NOSVE-NEXT: fcvt s0, h0 649; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 650; NONEON-NOSVE-NEXT: ldr h1, [sp, #42] 651; NONEON-NOSVE-NEXT: fcvt s1, h1 652; NONEON-NOSVE-NEXT: fcvt h0, s0 653; NONEON-NOSVE-NEXT: str h0, [sp, #92] 654; NONEON-NOSVE-NEXT: ldr h0, [sp, #58] 655; NONEON-NOSVE-NEXT: fcvt s0, h0 656; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 657; NONEON-NOSVE-NEXT: ldr h1, [sp, #40] 658; NONEON-NOSVE-NEXT: fcvt s1, h1 659; NONEON-NOSVE-NEXT: fcvt h0, s0 660; NONEON-NOSVE-NEXT: str h0, [sp, #90] 661; NONEON-NOSVE-NEXT: ldr h0, [sp, #56] 662; NONEON-NOSVE-NEXT: fcvt s0, h0 663; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 664; NONEON-NOSVE-NEXT: ldr h1, [sp, #38] 665; NONEON-NOSVE-NEXT: fcvt s1, h1 666; NONEON-NOSVE-NEXT: fcvt h0, s0 667; NONEON-NOSVE-NEXT: str h0, [sp, #88] 668; NONEON-NOSVE-NEXT: ldr h0, [sp, #54] 669; NONEON-NOSVE-NEXT: fcvt s0, h0 670; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 671; NONEON-NOSVE-NEXT: ldr h1, [sp, #36] 672; NONEON-NOSVE-NEXT: fcvt s1, h1 673; NONEON-NOSVE-NEXT: fcvt h0, s0 674; NONEON-NOSVE-NEXT: str h0, [sp, #86] 675; NONEON-NOSVE-NEXT: ldr h0, [sp, #52] 676; NONEON-NOSVE-NEXT: fcvt s0, h0 677; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 678; NONEON-NOSVE-NEXT: ldr h1, [sp, #34] 679; NONEON-NOSVE-NEXT: fcvt s1, h1 680; NONEON-NOSVE-NEXT: fcvt h0, s0 681; NONEON-NOSVE-NEXT: str h0, [sp, #84] 682; NONEON-NOSVE-NEXT: ldr h0, [sp, #50] 683; NONEON-NOSVE-NEXT: fcvt s0, h0 684; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 685; NONEON-NOSVE-NEXT: ldr h1, [sp, #32] 686; NONEON-NOSVE-NEXT: fcvt s1, h1 687; NONEON-NOSVE-NEXT: fcvt h0, s0 688; NONEON-NOSVE-NEXT: str h0, [sp, #82] 689; NONEON-NOSVE-NEXT: ldr h0, [sp, #48] 690; NONEON-NOSVE-NEXT: fcvt s0, h0 691; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 692; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 693; NONEON-NOSVE-NEXT: fcvt s1, h1 694; NONEON-NOSVE-NEXT: fcvt h0, s0 695; NONEON-NOSVE-NEXT: str h0, [sp, #80] 696; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 697; NONEON-NOSVE-NEXT: fcvt s0, h0 698; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 699; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 700; NONEON-NOSVE-NEXT: fcvt s1, h1 701; NONEON-NOSVE-NEXT: fcvt h0, s0 702; NONEON-NOSVE-NEXT: str h0, [sp, #78] 703; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 704; NONEON-NOSVE-NEXT: fcvt s0, h0 705; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 706; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 707; NONEON-NOSVE-NEXT: fcvt s1, h1 708; NONEON-NOSVE-NEXT: fcvt h0, s0 709; NONEON-NOSVE-NEXT: str h0, [sp, #76] 710; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 711; NONEON-NOSVE-NEXT: fcvt s0, h0 712; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 713; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 714; NONEON-NOSVE-NEXT: fcvt s1, h1 715; NONEON-NOSVE-NEXT: fcvt h0, s0 716; NONEON-NOSVE-NEXT: str h0, [sp, #74] 717; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 718; NONEON-NOSVE-NEXT: fcvt s0, h0 719; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 720; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 721; NONEON-NOSVE-NEXT: fcvt s1, h1 722; NONEON-NOSVE-NEXT: fcvt h0, s0 723; NONEON-NOSVE-NEXT: str h0, [sp, #72] 724; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 725; NONEON-NOSVE-NEXT: fcvt s0, h0 726; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 727; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 728; NONEON-NOSVE-NEXT: fcvt s1, h1 729; NONEON-NOSVE-NEXT: fcvt h0, s0 730; NONEON-NOSVE-NEXT: str h0, [sp, #70] 731; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 732; NONEON-NOSVE-NEXT: fcvt s0, h0 733; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 734; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 735; NONEON-NOSVE-NEXT: fcvt s1, h1 736; NONEON-NOSVE-NEXT: fcvt h0, s0 737; NONEON-NOSVE-NEXT: str h0, [sp, #68] 738; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 739; NONEON-NOSVE-NEXT: fcvt s0, h0 740; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 741; NONEON-NOSVE-NEXT: ldr h1, [sp] 742; NONEON-NOSVE-NEXT: fcvt s1, h1 743; NONEON-NOSVE-NEXT: fcvt h0, s0 744; NONEON-NOSVE-NEXT: str h0, [sp, #66] 745; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 746; NONEON-NOSVE-NEXT: fcvt s0, h0 747; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 748; NONEON-NOSVE-NEXT: fcvt h0, s0 749; NONEON-NOSVE-NEXT: str h0, [sp, #64] 750; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 751; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 752; NONEON-NOSVE-NEXT: add sp, sp, #96 753; NONEON-NOSVE-NEXT: ret 754 %op1 = load <16 x half>, ptr %a 755 %op2 = load <16 x half>, ptr %b 756 %res = call <16 x half> @llvm.minnum.v16f16(<16 x half> %op1, <16 x half> %op2) 757 store <16 x half> %res, ptr %a 758 ret void 759} 760 761define <2 x float> @fminnm_v2f32(<2 x float> %op1, <2 x float> %op2) { 762; CHECK-LABEL: fminnm_v2f32: 763; CHECK: // %bb.0: 764; CHECK-NEXT: ptrue p0.s, vl2 765; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 766; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 767; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, z1.s 768; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 769; CHECK-NEXT: ret 770; 771; NONEON-NOSVE-LABEL: fminnm_v2f32: 772; NONEON-NOSVE: // %bb.0: 773; NONEON-NOSVE-NEXT: sub sp, sp, #32 774; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 775; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 776; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 777; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 778; NONEON-NOSVE-NEXT: fminnm s3, s2, s0 779; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 780; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 781; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #24] 782; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 783; NONEON-NOSVE-NEXT: add sp, sp, #32 784; NONEON-NOSVE-NEXT: ret 785 %res = call <2 x float> @llvm.minnum.v2f32(<2 x float> %op1, <2 x float> %op2) 786 ret <2 x float> %res 787} 788 789define <4 x float> @fminnm_v4f32(<4 x float> %op1, <4 x float> %op2) { 790; CHECK-LABEL: fminnm_v4f32: 791; CHECK: // %bb.0: 792; CHECK-NEXT: ptrue p0.s, vl4 793; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 794; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 795; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, z1.s 796; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 797; CHECK-NEXT: ret 798; 799; NONEON-NOSVE-LABEL: fminnm_v4f32: 800; NONEON-NOSVE: // %bb.0: 801; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 802; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 803; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 804; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 805; NONEON-NOSVE-NEXT: fminnm s3, s2, s0 806; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 807; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 808; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 809; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #40] 810; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 811; NONEON-NOSVE-NEXT: fminnm s3, s2, s0 812; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 813; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 814; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #32] 815; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 816; NONEON-NOSVE-NEXT: add sp, sp, #48 817; NONEON-NOSVE-NEXT: ret 818 %res = call <4 x float> @llvm.minnum.v4f32(<4 x float> %op1, <4 x float> %op2) 819 ret <4 x float> %res 820} 821 822define void @fminnm_v8f32(ptr %a, ptr %b) { 823; CHECK-LABEL: fminnm_v8f32: 824; CHECK: // %bb.0: 825; CHECK-NEXT: ldp q0, q3, [x1] 826; CHECK-NEXT: ptrue p0.s, vl4 827; CHECK-NEXT: ldp q1, q2, [x0] 828; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, z1.s 829; CHECK-NEXT: movprfx z1, z2 830; CHECK-NEXT: fminnm z1.s, p0/m, z1.s, z3.s 831; CHECK-NEXT: stp q0, q1, [x0] 832; CHECK-NEXT: ret 833; 834; NONEON-NOSVE-LABEL: fminnm_v8f32: 835; NONEON-NOSVE: // %bb.0: 836; NONEON-NOSVE-NEXT: sub sp, sp, #96 837; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 838; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 839; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 840; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 841; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 842; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #40] 843; NONEON-NOSVE-NEXT: ldr s0, [sp, #60] 844; NONEON-NOSVE-NEXT: fminnm s3, s2, s0 845; NONEON-NOSVE-NEXT: ldr s0, [sp, #56] 846; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 847; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #32] 848; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #88] 849; NONEON-NOSVE-NEXT: ldr s0, [sp, #52] 850; NONEON-NOSVE-NEXT: fminnm s3, s2, s0 851; NONEON-NOSVE-NEXT: ldr s0, [sp, #48] 852; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 853; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 854; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #80] 855; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 856; NONEON-NOSVE-NEXT: fminnm s3, s2, s0 857; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 858; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 859; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 860; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #72] 861; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 862; NONEON-NOSVE-NEXT: fminnm s3, s2, s0 863; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 864; NONEON-NOSVE-NEXT: fminnm s0, s1, s0 865; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #64] 866; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 867; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 868; NONEON-NOSVE-NEXT: add sp, sp, #96 869; NONEON-NOSVE-NEXT: ret 870 %op1 = load <8 x float>, ptr %a 871 %op2 = load <8 x float>, ptr %b 872 %res = call <8 x float> @llvm.minnum.v8f32(<8 x float> %op1, <8 x float> %op2) 873 store <8 x float> %res, ptr %a 874 ret void 875} 876 877define <1 x double> @fminnm_v1f64(<1 x double> %op1, <1 x double> %op2) { 878; CHECK-LABEL: fminnm_v1f64: 879; CHECK: // %bb.0: 880; CHECK-NEXT: fminnm d0, d0, d1 881; CHECK-NEXT: ret 882; 883; NONEON-NOSVE-LABEL: fminnm_v1f64: 884; NONEON-NOSVE: // %bb.0: 885; NONEON-NOSVE-NEXT: sub sp, sp, #16 886; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16 887; NONEON-NOSVE-NEXT: fminnm d0, d0, d1 888; NONEON-NOSVE-NEXT: str d0, [sp, #8] 889; NONEON-NOSVE-NEXT: ldr d0, [sp, #8] 890; NONEON-NOSVE-NEXT: add sp, sp, #16 891; NONEON-NOSVE-NEXT: ret 892 %res = call <1 x double> @llvm.minnum.v1f64(<1 x double> %op1, <1 x double> %op2) 893 ret <1 x double> %res 894} 895 896define <2 x double> @fminnm_v2f64(<2 x double> %op1, <2 x double> %op2) { 897; CHECK-LABEL: fminnm_v2f64: 898; CHECK: // %bb.0: 899; CHECK-NEXT: ptrue p0.d, vl2 900; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 901; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 902; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, z1.d 903; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 904; CHECK-NEXT: ret 905; 906; NONEON-NOSVE-LABEL: fminnm_v2f64: 907; NONEON-NOSVE: // %bb.0: 908; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 909; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 910; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 911; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 912; NONEON-NOSVE-NEXT: fminnm d3, d2, d0 913; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 914; NONEON-NOSVE-NEXT: fminnm d0, d1, d0 915; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #32] 916; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 917; NONEON-NOSVE-NEXT: add sp, sp, #48 918; NONEON-NOSVE-NEXT: ret 919 %res = call <2 x double> @llvm.minnum.v2f64(<2 x double> %op1, <2 x double> %op2) 920 ret <2 x double> %res 921} 922 923define void @fminnm_v4f64(ptr %a, ptr %b) { 924; CHECK-LABEL: fminnm_v4f64: 925; CHECK: // %bb.0: 926; CHECK-NEXT: ldp q0, q3, [x1] 927; CHECK-NEXT: ptrue p0.d, vl2 928; CHECK-NEXT: ldp q1, q2, [x0] 929; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, z1.d 930; CHECK-NEXT: movprfx z1, z2 931; CHECK-NEXT: fminnm z1.d, p0/m, z1.d, z3.d 932; CHECK-NEXT: stp q0, q1, [x0] 933; CHECK-NEXT: ret 934; 935; NONEON-NOSVE-LABEL: fminnm_v4f64: 936; NONEON-NOSVE: // %bb.0: 937; NONEON-NOSVE-NEXT: sub sp, sp, #96 938; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 939; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 940; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 941; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 942; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 943; NONEON-NOSVE-NEXT: ldp d1, d2, [sp, #32] 944; NONEON-NOSVE-NEXT: ldr d0, [sp, #56] 945; NONEON-NOSVE-NEXT: fminnm d3, d2, d0 946; NONEON-NOSVE-NEXT: ldr d0, [sp, #48] 947; NONEON-NOSVE-NEXT: fminnm d0, d1, d0 948; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 949; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #80] 950; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 951; NONEON-NOSVE-NEXT: fminnm d3, d2, d0 952; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 953; NONEON-NOSVE-NEXT: fminnm d0, d1, d0 954; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #64] 955; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 956; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 957; NONEON-NOSVE-NEXT: add sp, sp, #96 958; NONEON-NOSVE-NEXT: ret 959 %op1 = load <4 x double>, ptr %a 960 %op2 = load <4 x double>, ptr %b 961 %res = call <4 x double> @llvm.minnum.v4f64(<4 x double> %op1, <4 x double> %op2) 962 store <4 x double> %res, ptr %a 963 ret void 964} 965 966; 967; FMAX 968; 969 970define <4 x half> @fmax_v4f16(<4 x half> %op1, <4 x half> %op2) { 971; CHECK-LABEL: fmax_v4f16: 972; CHECK: // %bb.0: 973; CHECK-NEXT: ptrue p0.h, vl4 974; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 975; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 976; CHECK-NEXT: fmax z0.h, p0/m, z0.h, z1.h 977; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 978; CHECK-NEXT: ret 979; 980; NONEON-NOSVE-LABEL: fmax_v4f16: 981; NONEON-NOSVE: // %bb.0: 982; NONEON-NOSVE-NEXT: sub sp, sp, #32 983; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 984; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 985; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 986; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 987; NONEON-NOSVE-NEXT: fcvt s0, h0 988; NONEON-NOSVE-NEXT: fcvt s1, h1 989; NONEON-NOSVE-NEXT: fmax s0, s1, s0 990; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 991; NONEON-NOSVE-NEXT: fcvt s1, h1 992; NONEON-NOSVE-NEXT: fcvt h0, s0 993; NONEON-NOSVE-NEXT: str h0, [sp, #30] 994; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 995; NONEON-NOSVE-NEXT: fcvt s0, h0 996; NONEON-NOSVE-NEXT: fmax s0, s1, s0 997; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 998; NONEON-NOSVE-NEXT: fcvt s1, h1 999; NONEON-NOSVE-NEXT: fcvt h0, s0 1000; NONEON-NOSVE-NEXT: str h0, [sp, #28] 1001; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 1002; NONEON-NOSVE-NEXT: fcvt s0, h0 1003; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1004; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 1005; NONEON-NOSVE-NEXT: fcvt s1, h1 1006; NONEON-NOSVE-NEXT: fcvt h0, s0 1007; NONEON-NOSVE-NEXT: str h0, [sp, #26] 1008; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 1009; NONEON-NOSVE-NEXT: fcvt s0, h0 1010; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1011; NONEON-NOSVE-NEXT: fcvt h0, s0 1012; NONEON-NOSVE-NEXT: str h0, [sp, #24] 1013; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1014; NONEON-NOSVE-NEXT: add sp, sp, #32 1015; NONEON-NOSVE-NEXT: ret 1016 %res = call <4 x half> @llvm.maximum.v4f16(<4 x half> %op1, <4 x half> %op2) 1017 ret <4 x half> %res 1018} 1019 1020define <8 x half> @fmax_v8f16(<8 x half> %op1, <8 x half> %op2) { 1021; CHECK-LABEL: fmax_v8f16: 1022; CHECK: // %bb.0: 1023; CHECK-NEXT: ptrue p0.h, vl8 1024; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 1025; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 1026; CHECK-NEXT: fmax z0.h, p0/m, z0.h, z1.h 1027; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 1028; CHECK-NEXT: ret 1029; 1030; NONEON-NOSVE-LABEL: fmax_v8f16: 1031; NONEON-NOSVE: // %bb.0: 1032; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 1033; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 1034; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 1035; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 1036; NONEON-NOSVE-NEXT: fcvt s0, h0 1037; NONEON-NOSVE-NEXT: fcvt s1, h1 1038; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1039; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 1040; NONEON-NOSVE-NEXT: fcvt s1, h1 1041; NONEON-NOSVE-NEXT: fcvt h0, s0 1042; NONEON-NOSVE-NEXT: str h0, [sp, #46] 1043; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 1044; NONEON-NOSVE-NEXT: fcvt s0, h0 1045; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1046; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 1047; NONEON-NOSVE-NEXT: fcvt s1, h1 1048; NONEON-NOSVE-NEXT: fcvt h0, s0 1049; NONEON-NOSVE-NEXT: str h0, [sp, #44] 1050; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 1051; NONEON-NOSVE-NEXT: fcvt s0, h0 1052; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1053; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 1054; NONEON-NOSVE-NEXT: fcvt s1, h1 1055; NONEON-NOSVE-NEXT: fcvt h0, s0 1056; NONEON-NOSVE-NEXT: str h0, [sp, #42] 1057; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 1058; NONEON-NOSVE-NEXT: fcvt s0, h0 1059; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1060; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 1061; NONEON-NOSVE-NEXT: fcvt s1, h1 1062; NONEON-NOSVE-NEXT: fcvt h0, s0 1063; NONEON-NOSVE-NEXT: str h0, [sp, #40] 1064; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 1065; NONEON-NOSVE-NEXT: fcvt s0, h0 1066; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1067; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 1068; NONEON-NOSVE-NEXT: fcvt s1, h1 1069; NONEON-NOSVE-NEXT: fcvt h0, s0 1070; NONEON-NOSVE-NEXT: str h0, [sp, #38] 1071; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 1072; NONEON-NOSVE-NEXT: fcvt s0, h0 1073; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1074; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 1075; NONEON-NOSVE-NEXT: fcvt s1, h1 1076; NONEON-NOSVE-NEXT: fcvt h0, s0 1077; NONEON-NOSVE-NEXT: str h0, [sp, #36] 1078; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 1079; NONEON-NOSVE-NEXT: fcvt s0, h0 1080; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1081; NONEON-NOSVE-NEXT: ldr h1, [sp] 1082; NONEON-NOSVE-NEXT: fcvt s1, h1 1083; NONEON-NOSVE-NEXT: fcvt h0, s0 1084; NONEON-NOSVE-NEXT: str h0, [sp, #34] 1085; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 1086; NONEON-NOSVE-NEXT: fcvt s0, h0 1087; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1088; NONEON-NOSVE-NEXT: fcvt h0, s0 1089; NONEON-NOSVE-NEXT: str h0, [sp, #32] 1090; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 1091; NONEON-NOSVE-NEXT: add sp, sp, #48 1092; NONEON-NOSVE-NEXT: ret 1093 %res = call <8 x half> @llvm.maximum.v8f16(<8 x half> %op1, <8 x half> %op2) 1094 ret <8 x half> %res 1095} 1096 1097define void @fmax_v16f16(ptr %a, ptr %b) { 1098; CHECK-LABEL: fmax_v16f16: 1099; CHECK: // %bb.0: 1100; CHECK-NEXT: ldp q0, q3, [x1] 1101; CHECK-NEXT: ptrue p0.h, vl8 1102; CHECK-NEXT: ldp q1, q2, [x0] 1103; CHECK-NEXT: fmax z0.h, p0/m, z0.h, z1.h 1104; CHECK-NEXT: movprfx z1, z2 1105; CHECK-NEXT: fmax z1.h, p0/m, z1.h, z3.h 1106; CHECK-NEXT: stp q0, q1, [x0] 1107; CHECK-NEXT: ret 1108; 1109; NONEON-NOSVE-LABEL: fmax_v16f16: 1110; NONEON-NOSVE: // %bb.0: 1111; NONEON-NOSVE-NEXT: sub sp, sp, #96 1112; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 1113; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 1114; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 1115; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 1116; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 1117; NONEON-NOSVE-NEXT: ldr h0, [sp, #62] 1118; NONEON-NOSVE-NEXT: ldr h1, [sp, #46] 1119; NONEON-NOSVE-NEXT: fcvt s0, h0 1120; NONEON-NOSVE-NEXT: fcvt s1, h1 1121; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1122; NONEON-NOSVE-NEXT: ldr h1, [sp, #44] 1123; NONEON-NOSVE-NEXT: fcvt s1, h1 1124; NONEON-NOSVE-NEXT: fcvt h0, s0 1125; NONEON-NOSVE-NEXT: str h0, [sp, #94] 1126; NONEON-NOSVE-NEXT: ldr h0, [sp, #60] 1127; NONEON-NOSVE-NEXT: fcvt s0, h0 1128; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1129; NONEON-NOSVE-NEXT: ldr h1, [sp, #42] 1130; NONEON-NOSVE-NEXT: fcvt s1, h1 1131; NONEON-NOSVE-NEXT: fcvt h0, s0 1132; NONEON-NOSVE-NEXT: str h0, [sp, #92] 1133; NONEON-NOSVE-NEXT: ldr h0, [sp, #58] 1134; NONEON-NOSVE-NEXT: fcvt s0, h0 1135; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1136; NONEON-NOSVE-NEXT: ldr h1, [sp, #40] 1137; NONEON-NOSVE-NEXT: fcvt s1, h1 1138; NONEON-NOSVE-NEXT: fcvt h0, s0 1139; NONEON-NOSVE-NEXT: str h0, [sp, #90] 1140; NONEON-NOSVE-NEXT: ldr h0, [sp, #56] 1141; NONEON-NOSVE-NEXT: fcvt s0, h0 1142; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1143; NONEON-NOSVE-NEXT: ldr h1, [sp, #38] 1144; NONEON-NOSVE-NEXT: fcvt s1, h1 1145; NONEON-NOSVE-NEXT: fcvt h0, s0 1146; NONEON-NOSVE-NEXT: str h0, [sp, #88] 1147; NONEON-NOSVE-NEXT: ldr h0, [sp, #54] 1148; NONEON-NOSVE-NEXT: fcvt s0, h0 1149; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1150; NONEON-NOSVE-NEXT: ldr h1, [sp, #36] 1151; NONEON-NOSVE-NEXT: fcvt s1, h1 1152; NONEON-NOSVE-NEXT: fcvt h0, s0 1153; NONEON-NOSVE-NEXT: str h0, [sp, #86] 1154; NONEON-NOSVE-NEXT: ldr h0, [sp, #52] 1155; NONEON-NOSVE-NEXT: fcvt s0, h0 1156; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1157; NONEON-NOSVE-NEXT: ldr h1, [sp, #34] 1158; NONEON-NOSVE-NEXT: fcvt s1, h1 1159; NONEON-NOSVE-NEXT: fcvt h0, s0 1160; NONEON-NOSVE-NEXT: str h0, [sp, #84] 1161; NONEON-NOSVE-NEXT: ldr h0, [sp, #50] 1162; NONEON-NOSVE-NEXT: fcvt s0, h0 1163; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1164; NONEON-NOSVE-NEXT: ldr h1, [sp, #32] 1165; NONEON-NOSVE-NEXT: fcvt s1, h1 1166; NONEON-NOSVE-NEXT: fcvt h0, s0 1167; NONEON-NOSVE-NEXT: str h0, [sp, #82] 1168; NONEON-NOSVE-NEXT: ldr h0, [sp, #48] 1169; NONEON-NOSVE-NEXT: fcvt s0, h0 1170; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1171; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 1172; NONEON-NOSVE-NEXT: fcvt s1, h1 1173; NONEON-NOSVE-NEXT: fcvt h0, s0 1174; NONEON-NOSVE-NEXT: str h0, [sp, #80] 1175; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 1176; NONEON-NOSVE-NEXT: fcvt s0, h0 1177; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1178; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 1179; NONEON-NOSVE-NEXT: fcvt s1, h1 1180; NONEON-NOSVE-NEXT: fcvt h0, s0 1181; NONEON-NOSVE-NEXT: str h0, [sp, #78] 1182; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 1183; NONEON-NOSVE-NEXT: fcvt s0, h0 1184; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1185; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 1186; NONEON-NOSVE-NEXT: fcvt s1, h1 1187; NONEON-NOSVE-NEXT: fcvt h0, s0 1188; NONEON-NOSVE-NEXT: str h0, [sp, #76] 1189; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 1190; NONEON-NOSVE-NEXT: fcvt s0, h0 1191; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1192; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 1193; NONEON-NOSVE-NEXT: fcvt s1, h1 1194; NONEON-NOSVE-NEXT: fcvt h0, s0 1195; NONEON-NOSVE-NEXT: str h0, [sp, #74] 1196; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 1197; NONEON-NOSVE-NEXT: fcvt s0, h0 1198; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1199; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 1200; NONEON-NOSVE-NEXT: fcvt s1, h1 1201; NONEON-NOSVE-NEXT: fcvt h0, s0 1202; NONEON-NOSVE-NEXT: str h0, [sp, #72] 1203; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 1204; NONEON-NOSVE-NEXT: fcvt s0, h0 1205; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1206; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 1207; NONEON-NOSVE-NEXT: fcvt s1, h1 1208; NONEON-NOSVE-NEXT: fcvt h0, s0 1209; NONEON-NOSVE-NEXT: str h0, [sp, #70] 1210; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 1211; NONEON-NOSVE-NEXT: fcvt s0, h0 1212; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1213; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 1214; NONEON-NOSVE-NEXT: fcvt s1, h1 1215; NONEON-NOSVE-NEXT: fcvt h0, s0 1216; NONEON-NOSVE-NEXT: str h0, [sp, #68] 1217; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 1218; NONEON-NOSVE-NEXT: fcvt s0, h0 1219; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1220; NONEON-NOSVE-NEXT: ldr h1, [sp] 1221; NONEON-NOSVE-NEXT: fcvt s1, h1 1222; NONEON-NOSVE-NEXT: fcvt h0, s0 1223; NONEON-NOSVE-NEXT: str h0, [sp, #66] 1224; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 1225; NONEON-NOSVE-NEXT: fcvt s0, h0 1226; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1227; NONEON-NOSVE-NEXT: fcvt h0, s0 1228; NONEON-NOSVE-NEXT: str h0, [sp, #64] 1229; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 1230; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 1231; NONEON-NOSVE-NEXT: add sp, sp, #96 1232; NONEON-NOSVE-NEXT: ret 1233 %op1 = load <16 x half>, ptr %a 1234 %op2 = load <16 x half>, ptr %b 1235 %res = call <16 x half> @llvm.maximum.v16f16(<16 x half> %op1, <16 x half> %op2) 1236 store <16 x half> %res, ptr %a 1237 ret void 1238} 1239 1240define <2 x float> @fmax_v2f32(<2 x float> %op1, <2 x float> %op2) { 1241; CHECK-LABEL: fmax_v2f32: 1242; CHECK: // %bb.0: 1243; CHECK-NEXT: ptrue p0.s, vl2 1244; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 1245; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 1246; CHECK-NEXT: fmax z0.s, p0/m, z0.s, z1.s 1247; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 1248; CHECK-NEXT: ret 1249; 1250; NONEON-NOSVE-LABEL: fmax_v2f32: 1251; NONEON-NOSVE: // %bb.0: 1252; NONEON-NOSVE-NEXT: sub sp, sp, #32 1253; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 1254; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 1255; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 1256; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 1257; NONEON-NOSVE-NEXT: fmax s3, s2, s0 1258; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 1259; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1260; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #24] 1261; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1262; NONEON-NOSVE-NEXT: add sp, sp, #32 1263; NONEON-NOSVE-NEXT: ret 1264 %res = call <2 x float> @llvm.maximum.v2f32(<2 x float> %op1, <2 x float> %op2) 1265 ret <2 x float> %res 1266} 1267 1268define <4 x float> @fmax_v4f32(<4 x float> %op1, <4 x float> %op2) { 1269; CHECK-LABEL: fmax_v4f32: 1270; CHECK: // %bb.0: 1271; CHECK-NEXT: ptrue p0.s, vl4 1272; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 1273; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 1274; CHECK-NEXT: fmax z0.s, p0/m, z0.s, z1.s 1275; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 1276; CHECK-NEXT: ret 1277; 1278; NONEON-NOSVE-LABEL: fmax_v4f32: 1279; NONEON-NOSVE: // %bb.0: 1280; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 1281; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 1282; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 1283; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 1284; NONEON-NOSVE-NEXT: fmax s3, s2, s0 1285; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 1286; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1287; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 1288; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #40] 1289; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 1290; NONEON-NOSVE-NEXT: fmax s3, s2, s0 1291; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 1292; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1293; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #32] 1294; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 1295; NONEON-NOSVE-NEXT: add sp, sp, #48 1296; NONEON-NOSVE-NEXT: ret 1297 %res = call <4 x float> @llvm.maximum.v4f32(<4 x float> %op1, <4 x float> %op2) 1298 ret <4 x float> %res 1299} 1300 1301define void @fmax_v8f32(ptr %a, ptr %b) { 1302; CHECK-LABEL: fmax_v8f32: 1303; CHECK: // %bb.0: 1304; CHECK-NEXT: ldp q0, q3, [x1] 1305; CHECK-NEXT: ptrue p0.s, vl4 1306; CHECK-NEXT: ldp q1, q2, [x0] 1307; CHECK-NEXT: fmax z0.s, p0/m, z0.s, z1.s 1308; CHECK-NEXT: movprfx z1, z2 1309; CHECK-NEXT: fmax z1.s, p0/m, z1.s, z3.s 1310; CHECK-NEXT: stp q0, q1, [x0] 1311; CHECK-NEXT: ret 1312; 1313; NONEON-NOSVE-LABEL: fmax_v8f32: 1314; NONEON-NOSVE: // %bb.0: 1315; NONEON-NOSVE-NEXT: sub sp, sp, #96 1316; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 1317; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 1318; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 1319; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 1320; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 1321; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #40] 1322; NONEON-NOSVE-NEXT: ldr s0, [sp, #60] 1323; NONEON-NOSVE-NEXT: fmax s3, s2, s0 1324; NONEON-NOSVE-NEXT: ldr s0, [sp, #56] 1325; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1326; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #32] 1327; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #88] 1328; NONEON-NOSVE-NEXT: ldr s0, [sp, #52] 1329; NONEON-NOSVE-NEXT: fmax s3, s2, s0 1330; NONEON-NOSVE-NEXT: ldr s0, [sp, #48] 1331; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1332; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 1333; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #80] 1334; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 1335; NONEON-NOSVE-NEXT: fmax s3, s2, s0 1336; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 1337; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1338; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 1339; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #72] 1340; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 1341; NONEON-NOSVE-NEXT: fmax s3, s2, s0 1342; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 1343; NONEON-NOSVE-NEXT: fmax s0, s1, s0 1344; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #64] 1345; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 1346; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 1347; NONEON-NOSVE-NEXT: add sp, sp, #96 1348; NONEON-NOSVE-NEXT: ret 1349 %op1 = load <8 x float>, ptr %a 1350 %op2 = load <8 x float>, ptr %b 1351 %res = call <8 x float> @llvm.maximum.v8f32(<8 x float> %op1, <8 x float> %op2) 1352 store <8 x float> %res, ptr %a 1353 ret void 1354} 1355 1356define <1 x double> @fmax_v1f64(<1 x double> %op1, <1 x double> %op2) { 1357; CHECK-LABEL: fmax_v1f64: 1358; CHECK: // %bb.0: 1359; CHECK-NEXT: fmax d0, d0, d1 1360; CHECK-NEXT: ret 1361; 1362; NONEON-NOSVE-LABEL: fmax_v1f64: 1363; NONEON-NOSVE: // %bb.0: 1364; NONEON-NOSVE-NEXT: sub sp, sp, #16 1365; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16 1366; NONEON-NOSVE-NEXT: fmax d0, d0, d1 1367; NONEON-NOSVE-NEXT: str d0, [sp, #8] 1368; NONEON-NOSVE-NEXT: ldr d0, [sp, #8] 1369; NONEON-NOSVE-NEXT: add sp, sp, #16 1370; NONEON-NOSVE-NEXT: ret 1371 %res = call <1 x double> @llvm.maximum.v1f64(<1 x double> %op1, <1 x double> %op2) 1372 ret <1 x double> %res 1373} 1374 1375define <2 x double> @fmax_v2f64(<2 x double> %op1, <2 x double> %op2) { 1376; CHECK-LABEL: fmax_v2f64: 1377; CHECK: // %bb.0: 1378; CHECK-NEXT: ptrue p0.d, vl2 1379; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 1380; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 1381; CHECK-NEXT: fmax z0.d, p0/m, z0.d, z1.d 1382; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 1383; CHECK-NEXT: ret 1384; 1385; NONEON-NOSVE-LABEL: fmax_v2f64: 1386; NONEON-NOSVE: // %bb.0: 1387; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 1388; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 1389; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 1390; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1391; NONEON-NOSVE-NEXT: fmax d3, d2, d0 1392; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 1393; NONEON-NOSVE-NEXT: fmax d0, d1, d0 1394; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #32] 1395; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 1396; NONEON-NOSVE-NEXT: add sp, sp, #48 1397; NONEON-NOSVE-NEXT: ret 1398 %res = call <2 x double> @llvm.maximum.v2f64(<2 x double> %op1, <2 x double> %op2) 1399 ret <2 x double> %res 1400} 1401 1402define void @fmax_v4f64(ptr %a, ptr %b) { 1403; CHECK-LABEL: fmax_v4f64: 1404; CHECK: // %bb.0: 1405; CHECK-NEXT: ldp q0, q3, [x1] 1406; CHECK-NEXT: ptrue p0.d, vl2 1407; CHECK-NEXT: ldp q1, q2, [x0] 1408; CHECK-NEXT: fmax z0.d, p0/m, z0.d, z1.d 1409; CHECK-NEXT: movprfx z1, z2 1410; CHECK-NEXT: fmax z1.d, p0/m, z1.d, z3.d 1411; CHECK-NEXT: stp q0, q1, [x0] 1412; CHECK-NEXT: ret 1413; 1414; NONEON-NOSVE-LABEL: fmax_v4f64: 1415; NONEON-NOSVE: // %bb.0: 1416; NONEON-NOSVE-NEXT: sub sp, sp, #96 1417; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 1418; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 1419; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 1420; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 1421; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 1422; NONEON-NOSVE-NEXT: ldp d1, d2, [sp, #32] 1423; NONEON-NOSVE-NEXT: ldr d0, [sp, #56] 1424; NONEON-NOSVE-NEXT: fmax d3, d2, d0 1425; NONEON-NOSVE-NEXT: ldr d0, [sp, #48] 1426; NONEON-NOSVE-NEXT: fmax d0, d1, d0 1427; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 1428; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #80] 1429; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1430; NONEON-NOSVE-NEXT: fmax d3, d2, d0 1431; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 1432; NONEON-NOSVE-NEXT: fmax d0, d1, d0 1433; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #64] 1434; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 1435; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 1436; NONEON-NOSVE-NEXT: add sp, sp, #96 1437; NONEON-NOSVE-NEXT: ret 1438 %op1 = load <4 x double>, ptr %a 1439 %op2 = load <4 x double>, ptr %b 1440 %res = call <4 x double> @llvm.maximum.v4f64(<4 x double> %op1, <4 x double> %op2) 1441 store <4 x double> %res, ptr %a 1442 ret void 1443} 1444 1445; 1446; FMIN 1447; 1448 1449define <4 x half> @fmin_v4f16(<4 x half> %op1, <4 x half> %op2) { 1450; CHECK-LABEL: fmin_v4f16: 1451; CHECK: // %bb.0: 1452; CHECK-NEXT: ptrue p0.h, vl4 1453; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 1454; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 1455; CHECK-NEXT: fmin z0.h, p0/m, z0.h, z1.h 1456; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 1457; CHECK-NEXT: ret 1458; 1459; NONEON-NOSVE-LABEL: fmin_v4f16: 1460; NONEON-NOSVE: // %bb.0: 1461; NONEON-NOSVE-NEXT: sub sp, sp, #32 1462; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 1463; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 1464; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 1465; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 1466; NONEON-NOSVE-NEXT: fcvt s0, h0 1467; NONEON-NOSVE-NEXT: fcvt s1, h1 1468; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1469; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 1470; NONEON-NOSVE-NEXT: fcvt s1, h1 1471; NONEON-NOSVE-NEXT: fcvt h0, s0 1472; NONEON-NOSVE-NEXT: str h0, [sp, #30] 1473; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 1474; NONEON-NOSVE-NEXT: fcvt s0, h0 1475; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1476; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 1477; NONEON-NOSVE-NEXT: fcvt s1, h1 1478; NONEON-NOSVE-NEXT: fcvt h0, s0 1479; NONEON-NOSVE-NEXT: str h0, [sp, #28] 1480; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 1481; NONEON-NOSVE-NEXT: fcvt s0, h0 1482; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1483; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 1484; NONEON-NOSVE-NEXT: fcvt s1, h1 1485; NONEON-NOSVE-NEXT: fcvt h0, s0 1486; NONEON-NOSVE-NEXT: str h0, [sp, #26] 1487; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 1488; NONEON-NOSVE-NEXT: fcvt s0, h0 1489; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1490; NONEON-NOSVE-NEXT: fcvt h0, s0 1491; NONEON-NOSVE-NEXT: str h0, [sp, #24] 1492; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1493; NONEON-NOSVE-NEXT: add sp, sp, #32 1494; NONEON-NOSVE-NEXT: ret 1495 %res = call <4 x half> @llvm.minimum.v4f16(<4 x half> %op1, <4 x half> %op2) 1496 ret <4 x half> %res 1497} 1498 1499define <8 x half> @fmin_v8f16(<8 x half> %op1, <8 x half> %op2) { 1500; CHECK-LABEL: fmin_v8f16: 1501; CHECK: // %bb.0: 1502; CHECK-NEXT: ptrue p0.h, vl8 1503; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 1504; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 1505; CHECK-NEXT: fmin z0.h, p0/m, z0.h, z1.h 1506; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 1507; CHECK-NEXT: ret 1508; 1509; NONEON-NOSVE-LABEL: fmin_v8f16: 1510; NONEON-NOSVE: // %bb.0: 1511; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 1512; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 1513; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 1514; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 1515; NONEON-NOSVE-NEXT: fcvt s0, h0 1516; NONEON-NOSVE-NEXT: fcvt s1, h1 1517; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1518; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 1519; NONEON-NOSVE-NEXT: fcvt s1, h1 1520; NONEON-NOSVE-NEXT: fcvt h0, s0 1521; NONEON-NOSVE-NEXT: str h0, [sp, #46] 1522; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 1523; NONEON-NOSVE-NEXT: fcvt s0, h0 1524; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1525; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 1526; NONEON-NOSVE-NEXT: fcvt s1, h1 1527; NONEON-NOSVE-NEXT: fcvt h0, s0 1528; NONEON-NOSVE-NEXT: str h0, [sp, #44] 1529; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 1530; NONEON-NOSVE-NEXT: fcvt s0, h0 1531; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1532; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 1533; NONEON-NOSVE-NEXT: fcvt s1, h1 1534; NONEON-NOSVE-NEXT: fcvt h0, s0 1535; NONEON-NOSVE-NEXT: str h0, [sp, #42] 1536; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 1537; NONEON-NOSVE-NEXT: fcvt s0, h0 1538; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1539; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 1540; NONEON-NOSVE-NEXT: fcvt s1, h1 1541; NONEON-NOSVE-NEXT: fcvt h0, s0 1542; NONEON-NOSVE-NEXT: str h0, [sp, #40] 1543; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 1544; NONEON-NOSVE-NEXT: fcvt s0, h0 1545; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1546; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 1547; NONEON-NOSVE-NEXT: fcvt s1, h1 1548; NONEON-NOSVE-NEXT: fcvt h0, s0 1549; NONEON-NOSVE-NEXT: str h0, [sp, #38] 1550; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 1551; NONEON-NOSVE-NEXT: fcvt s0, h0 1552; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1553; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 1554; NONEON-NOSVE-NEXT: fcvt s1, h1 1555; NONEON-NOSVE-NEXT: fcvt h0, s0 1556; NONEON-NOSVE-NEXT: str h0, [sp, #36] 1557; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 1558; NONEON-NOSVE-NEXT: fcvt s0, h0 1559; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1560; NONEON-NOSVE-NEXT: ldr h1, [sp] 1561; NONEON-NOSVE-NEXT: fcvt s1, h1 1562; NONEON-NOSVE-NEXT: fcvt h0, s0 1563; NONEON-NOSVE-NEXT: str h0, [sp, #34] 1564; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 1565; NONEON-NOSVE-NEXT: fcvt s0, h0 1566; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1567; NONEON-NOSVE-NEXT: fcvt h0, s0 1568; NONEON-NOSVE-NEXT: str h0, [sp, #32] 1569; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 1570; NONEON-NOSVE-NEXT: add sp, sp, #48 1571; NONEON-NOSVE-NEXT: ret 1572 %res = call <8 x half> @llvm.minimum.v8f16(<8 x half> %op1, <8 x half> %op2) 1573 ret <8 x half> %res 1574} 1575 1576define void @fmin_v16f16(ptr %a, ptr %b) { 1577; CHECK-LABEL: fmin_v16f16: 1578; CHECK: // %bb.0: 1579; CHECK-NEXT: ldp q0, q3, [x1] 1580; CHECK-NEXT: ptrue p0.h, vl8 1581; CHECK-NEXT: ldp q1, q2, [x0] 1582; CHECK-NEXT: fmin z0.h, p0/m, z0.h, z1.h 1583; CHECK-NEXT: movprfx z1, z2 1584; CHECK-NEXT: fmin z1.h, p0/m, z1.h, z3.h 1585; CHECK-NEXT: stp q0, q1, [x0] 1586; CHECK-NEXT: ret 1587; 1588; NONEON-NOSVE-LABEL: fmin_v16f16: 1589; NONEON-NOSVE: // %bb.0: 1590; NONEON-NOSVE-NEXT: sub sp, sp, #96 1591; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 1592; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 1593; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 1594; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 1595; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 1596; NONEON-NOSVE-NEXT: ldr h0, [sp, #62] 1597; NONEON-NOSVE-NEXT: ldr h1, [sp, #46] 1598; NONEON-NOSVE-NEXT: fcvt s0, h0 1599; NONEON-NOSVE-NEXT: fcvt s1, h1 1600; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1601; NONEON-NOSVE-NEXT: ldr h1, [sp, #44] 1602; NONEON-NOSVE-NEXT: fcvt s1, h1 1603; NONEON-NOSVE-NEXT: fcvt h0, s0 1604; NONEON-NOSVE-NEXT: str h0, [sp, #94] 1605; NONEON-NOSVE-NEXT: ldr h0, [sp, #60] 1606; NONEON-NOSVE-NEXT: fcvt s0, h0 1607; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1608; NONEON-NOSVE-NEXT: ldr h1, [sp, #42] 1609; NONEON-NOSVE-NEXT: fcvt s1, h1 1610; NONEON-NOSVE-NEXT: fcvt h0, s0 1611; NONEON-NOSVE-NEXT: str h0, [sp, #92] 1612; NONEON-NOSVE-NEXT: ldr h0, [sp, #58] 1613; NONEON-NOSVE-NEXT: fcvt s0, h0 1614; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1615; NONEON-NOSVE-NEXT: ldr h1, [sp, #40] 1616; NONEON-NOSVE-NEXT: fcvt s1, h1 1617; NONEON-NOSVE-NEXT: fcvt h0, s0 1618; NONEON-NOSVE-NEXT: str h0, [sp, #90] 1619; NONEON-NOSVE-NEXT: ldr h0, [sp, #56] 1620; NONEON-NOSVE-NEXT: fcvt s0, h0 1621; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1622; NONEON-NOSVE-NEXT: ldr h1, [sp, #38] 1623; NONEON-NOSVE-NEXT: fcvt s1, h1 1624; NONEON-NOSVE-NEXT: fcvt h0, s0 1625; NONEON-NOSVE-NEXT: str h0, [sp, #88] 1626; NONEON-NOSVE-NEXT: ldr h0, [sp, #54] 1627; NONEON-NOSVE-NEXT: fcvt s0, h0 1628; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1629; NONEON-NOSVE-NEXT: ldr h1, [sp, #36] 1630; NONEON-NOSVE-NEXT: fcvt s1, h1 1631; NONEON-NOSVE-NEXT: fcvt h0, s0 1632; NONEON-NOSVE-NEXT: str h0, [sp, #86] 1633; NONEON-NOSVE-NEXT: ldr h0, [sp, #52] 1634; NONEON-NOSVE-NEXT: fcvt s0, h0 1635; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1636; NONEON-NOSVE-NEXT: ldr h1, [sp, #34] 1637; NONEON-NOSVE-NEXT: fcvt s1, h1 1638; NONEON-NOSVE-NEXT: fcvt h0, s0 1639; NONEON-NOSVE-NEXT: str h0, [sp, #84] 1640; NONEON-NOSVE-NEXT: ldr h0, [sp, #50] 1641; NONEON-NOSVE-NEXT: fcvt s0, h0 1642; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1643; NONEON-NOSVE-NEXT: ldr h1, [sp, #32] 1644; NONEON-NOSVE-NEXT: fcvt s1, h1 1645; NONEON-NOSVE-NEXT: fcvt h0, s0 1646; NONEON-NOSVE-NEXT: str h0, [sp, #82] 1647; NONEON-NOSVE-NEXT: ldr h0, [sp, #48] 1648; NONEON-NOSVE-NEXT: fcvt s0, h0 1649; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1650; NONEON-NOSVE-NEXT: ldr h1, [sp, #14] 1651; NONEON-NOSVE-NEXT: fcvt s1, h1 1652; NONEON-NOSVE-NEXT: fcvt h0, s0 1653; NONEON-NOSVE-NEXT: str h0, [sp, #80] 1654; NONEON-NOSVE-NEXT: ldr h0, [sp, #30] 1655; NONEON-NOSVE-NEXT: fcvt s0, h0 1656; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1657; NONEON-NOSVE-NEXT: ldr h1, [sp, #12] 1658; NONEON-NOSVE-NEXT: fcvt s1, h1 1659; NONEON-NOSVE-NEXT: fcvt h0, s0 1660; NONEON-NOSVE-NEXT: str h0, [sp, #78] 1661; NONEON-NOSVE-NEXT: ldr h0, [sp, #28] 1662; NONEON-NOSVE-NEXT: fcvt s0, h0 1663; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1664; NONEON-NOSVE-NEXT: ldr h1, [sp, #10] 1665; NONEON-NOSVE-NEXT: fcvt s1, h1 1666; NONEON-NOSVE-NEXT: fcvt h0, s0 1667; NONEON-NOSVE-NEXT: str h0, [sp, #76] 1668; NONEON-NOSVE-NEXT: ldr h0, [sp, #26] 1669; NONEON-NOSVE-NEXT: fcvt s0, h0 1670; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1671; NONEON-NOSVE-NEXT: ldr h1, [sp, #8] 1672; NONEON-NOSVE-NEXT: fcvt s1, h1 1673; NONEON-NOSVE-NEXT: fcvt h0, s0 1674; NONEON-NOSVE-NEXT: str h0, [sp, #74] 1675; NONEON-NOSVE-NEXT: ldr h0, [sp, #24] 1676; NONEON-NOSVE-NEXT: fcvt s0, h0 1677; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1678; NONEON-NOSVE-NEXT: ldr h1, [sp, #6] 1679; NONEON-NOSVE-NEXT: fcvt s1, h1 1680; NONEON-NOSVE-NEXT: fcvt h0, s0 1681; NONEON-NOSVE-NEXT: str h0, [sp, #72] 1682; NONEON-NOSVE-NEXT: ldr h0, [sp, #22] 1683; NONEON-NOSVE-NEXT: fcvt s0, h0 1684; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1685; NONEON-NOSVE-NEXT: ldr h1, [sp, #4] 1686; NONEON-NOSVE-NEXT: fcvt s1, h1 1687; NONEON-NOSVE-NEXT: fcvt h0, s0 1688; NONEON-NOSVE-NEXT: str h0, [sp, #70] 1689; NONEON-NOSVE-NEXT: ldr h0, [sp, #20] 1690; NONEON-NOSVE-NEXT: fcvt s0, h0 1691; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1692; NONEON-NOSVE-NEXT: ldr h1, [sp, #2] 1693; NONEON-NOSVE-NEXT: fcvt s1, h1 1694; NONEON-NOSVE-NEXT: fcvt h0, s0 1695; NONEON-NOSVE-NEXT: str h0, [sp, #68] 1696; NONEON-NOSVE-NEXT: ldr h0, [sp, #18] 1697; NONEON-NOSVE-NEXT: fcvt s0, h0 1698; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1699; NONEON-NOSVE-NEXT: ldr h1, [sp] 1700; NONEON-NOSVE-NEXT: fcvt s1, h1 1701; NONEON-NOSVE-NEXT: fcvt h0, s0 1702; NONEON-NOSVE-NEXT: str h0, [sp, #66] 1703; NONEON-NOSVE-NEXT: ldr h0, [sp, #16] 1704; NONEON-NOSVE-NEXT: fcvt s0, h0 1705; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1706; NONEON-NOSVE-NEXT: fcvt h0, s0 1707; NONEON-NOSVE-NEXT: str h0, [sp, #64] 1708; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 1709; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 1710; NONEON-NOSVE-NEXT: add sp, sp, #96 1711; NONEON-NOSVE-NEXT: ret 1712 %op1 = load <16 x half>, ptr %a 1713 %op2 = load <16 x half>, ptr %b 1714 %res = call <16 x half> @llvm.minimum.v16f16(<16 x half> %op1, <16 x half> %op2) 1715 store <16 x half> %res, ptr %a 1716 ret void 1717} 1718 1719define <2 x float> @fmin_v2f32(<2 x float> %op1, <2 x float> %op2) { 1720; CHECK-LABEL: fmin_v2f32: 1721; CHECK: // %bb.0: 1722; CHECK-NEXT: ptrue p0.s, vl2 1723; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0 1724; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1 1725; CHECK-NEXT: fmin z0.s, p0/m, z0.s, z1.s 1726; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0 1727; CHECK-NEXT: ret 1728; 1729; NONEON-NOSVE-LABEL: fmin_v2f32: 1730; NONEON-NOSVE: // %bb.0: 1731; NONEON-NOSVE-NEXT: sub sp, sp, #32 1732; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32 1733; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8] 1734; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 1735; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 1736; NONEON-NOSVE-NEXT: fmin s3, s2, s0 1737; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 1738; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1739; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #24] 1740; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1741; NONEON-NOSVE-NEXT: add sp, sp, #32 1742; NONEON-NOSVE-NEXT: ret 1743 %res = call <2 x float> @llvm.minimum.v2f32(<2 x float> %op1, <2 x float> %op2) 1744 ret <2 x float> %res 1745} 1746 1747define <4 x float> @fmin_v4f32(<4 x float> %op1, <4 x float> %op2) { 1748; CHECK-LABEL: fmin_v4f32: 1749; CHECK: // %bb.0: 1750; CHECK-NEXT: ptrue p0.s, vl4 1751; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 1752; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 1753; CHECK-NEXT: fmin z0.s, p0/m, z0.s, z1.s 1754; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 1755; CHECK-NEXT: ret 1756; 1757; NONEON-NOSVE-LABEL: fmin_v4f32: 1758; NONEON-NOSVE: // %bb.0: 1759; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 1760; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 1761; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 1762; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 1763; NONEON-NOSVE-NEXT: fmin s3, s2, s0 1764; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 1765; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1766; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 1767; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #40] 1768; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 1769; NONEON-NOSVE-NEXT: fmin s3, s2, s0 1770; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 1771; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1772; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #32] 1773; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 1774; NONEON-NOSVE-NEXT: add sp, sp, #48 1775; NONEON-NOSVE-NEXT: ret 1776 %res = call <4 x float> @llvm.minimum.v4f32(<4 x float> %op1, <4 x float> %op2) 1777 ret <4 x float> %res 1778} 1779 1780define void @fmin_v8f32(ptr %a, ptr %b) { 1781; CHECK-LABEL: fmin_v8f32: 1782; CHECK: // %bb.0: 1783; CHECK-NEXT: ldp q0, q3, [x1] 1784; CHECK-NEXT: ptrue p0.s, vl4 1785; CHECK-NEXT: ldp q1, q2, [x0] 1786; CHECK-NEXT: fmin z0.s, p0/m, z0.s, z1.s 1787; CHECK-NEXT: movprfx z1, z2 1788; CHECK-NEXT: fmin z1.s, p0/m, z1.s, z3.s 1789; CHECK-NEXT: stp q0, q1, [x0] 1790; CHECK-NEXT: ret 1791; 1792; NONEON-NOSVE-LABEL: fmin_v8f32: 1793; NONEON-NOSVE: // %bb.0: 1794; NONEON-NOSVE-NEXT: sub sp, sp, #96 1795; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 1796; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 1797; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 1798; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 1799; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 1800; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #40] 1801; NONEON-NOSVE-NEXT: ldr s0, [sp, #60] 1802; NONEON-NOSVE-NEXT: fmin s3, s2, s0 1803; NONEON-NOSVE-NEXT: ldr s0, [sp, #56] 1804; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1805; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #32] 1806; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #88] 1807; NONEON-NOSVE-NEXT: ldr s0, [sp, #52] 1808; NONEON-NOSVE-NEXT: fmin s3, s2, s0 1809; NONEON-NOSVE-NEXT: ldr s0, [sp, #48] 1810; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1811; NONEON-NOSVE-NEXT: ldp s1, s2, [sp, #8] 1812; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #80] 1813; NONEON-NOSVE-NEXT: ldr s0, [sp, #28] 1814; NONEON-NOSVE-NEXT: fmin s3, s2, s0 1815; NONEON-NOSVE-NEXT: ldr s0, [sp, #24] 1816; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1817; NONEON-NOSVE-NEXT: ldp s1, s2, [sp] 1818; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #72] 1819; NONEON-NOSVE-NEXT: ldr s0, [sp, #20] 1820; NONEON-NOSVE-NEXT: fmin s3, s2, s0 1821; NONEON-NOSVE-NEXT: ldr s0, [sp, #16] 1822; NONEON-NOSVE-NEXT: fmin s0, s1, s0 1823; NONEON-NOSVE-NEXT: stp s0, s3, [sp, #64] 1824; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 1825; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 1826; NONEON-NOSVE-NEXT: add sp, sp, #96 1827; NONEON-NOSVE-NEXT: ret 1828 %op1 = load <8 x float>, ptr %a 1829 %op2 = load <8 x float>, ptr %b 1830 %res = call <8 x float> @llvm.minimum.v8f32(<8 x float> %op1, <8 x float> %op2) 1831 store <8 x float> %res, ptr %a 1832 ret void 1833} 1834 1835define <1 x double> @fmin_v1f64(<1 x double> %op1, <1 x double> %op2) { 1836; CHECK-LABEL: fmin_v1f64: 1837; CHECK: // %bb.0: 1838; CHECK-NEXT: fmin d0, d0, d1 1839; CHECK-NEXT: ret 1840; 1841; NONEON-NOSVE-LABEL: fmin_v1f64: 1842; NONEON-NOSVE: // %bb.0: 1843; NONEON-NOSVE-NEXT: sub sp, sp, #16 1844; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16 1845; NONEON-NOSVE-NEXT: fmin d0, d0, d1 1846; NONEON-NOSVE-NEXT: str d0, [sp, #8] 1847; NONEON-NOSVE-NEXT: ldr d0, [sp, #8] 1848; NONEON-NOSVE-NEXT: add sp, sp, #16 1849; NONEON-NOSVE-NEXT: ret 1850 %res = call <1 x double> @llvm.minimum.v1f64(<1 x double> %op1, <1 x double> %op2) 1851 ret <1 x double> %res 1852} 1853 1854define <2 x double> @fmin_v2f64(<2 x double> %op1, <2 x double> %op2) { 1855; CHECK-LABEL: fmin_v2f64: 1856; CHECK: // %bb.0: 1857; CHECK-NEXT: ptrue p0.d, vl2 1858; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0 1859; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1 1860; CHECK-NEXT: fmin z0.d, p0/m, z0.d, z1.d 1861; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0 1862; CHECK-NEXT: ret 1863; 1864; NONEON-NOSVE-LABEL: fmin_v2f64: 1865; NONEON-NOSVE: // %bb.0: 1866; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]! 1867; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48 1868; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 1869; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1870; NONEON-NOSVE-NEXT: fmin d3, d2, d0 1871; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 1872; NONEON-NOSVE-NEXT: fmin d0, d1, d0 1873; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #32] 1874; NONEON-NOSVE-NEXT: ldr q0, [sp, #32] 1875; NONEON-NOSVE-NEXT: add sp, sp, #48 1876; NONEON-NOSVE-NEXT: ret 1877 %res = call <2 x double> @llvm.minimum.v2f64(<2 x double> %op1, <2 x double> %op2) 1878 ret <2 x double> %res 1879} 1880 1881define void @fmin_v4f64(ptr %a, ptr %b) { 1882; CHECK-LABEL: fmin_v4f64: 1883; CHECK: // %bb.0: 1884; CHECK-NEXT: ldp q0, q3, [x1] 1885; CHECK-NEXT: ptrue p0.d, vl2 1886; CHECK-NEXT: ldp q1, q2, [x0] 1887; CHECK-NEXT: fmin z0.d, p0/m, z0.d, z1.d 1888; CHECK-NEXT: movprfx z1, z2 1889; CHECK-NEXT: fmin z1.d, p0/m, z1.d, z3.d 1890; CHECK-NEXT: stp q0, q1, [x0] 1891; CHECK-NEXT: ret 1892; 1893; NONEON-NOSVE-LABEL: fmin_v4f64: 1894; NONEON-NOSVE: // %bb.0: 1895; NONEON-NOSVE-NEXT: sub sp, sp, #96 1896; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96 1897; NONEON-NOSVE-NEXT: ldp q3, q0, [x1] 1898; NONEON-NOSVE-NEXT: ldp q2, q1, [x0] 1899; NONEON-NOSVE-NEXT: stp q2, q3, [sp] 1900; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32] 1901; NONEON-NOSVE-NEXT: ldp d1, d2, [sp, #32] 1902; NONEON-NOSVE-NEXT: ldr d0, [sp, #56] 1903; NONEON-NOSVE-NEXT: fmin d3, d2, d0 1904; NONEON-NOSVE-NEXT: ldr d0, [sp, #48] 1905; NONEON-NOSVE-NEXT: fmin d0, d1, d0 1906; NONEON-NOSVE-NEXT: ldp d1, d2, [sp] 1907; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #80] 1908; NONEON-NOSVE-NEXT: ldr d0, [sp, #24] 1909; NONEON-NOSVE-NEXT: fmin d3, d2, d0 1910; NONEON-NOSVE-NEXT: ldr d0, [sp, #16] 1911; NONEON-NOSVE-NEXT: fmin d0, d1, d0 1912; NONEON-NOSVE-NEXT: stp d0, d3, [sp, #64] 1913; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64] 1914; NONEON-NOSVE-NEXT: stp q0, q1, [x0] 1915; NONEON-NOSVE-NEXT: add sp, sp, #96 1916; NONEON-NOSVE-NEXT: ret 1917 %op1 = load <4 x double>, ptr %a 1918 %op2 = load <4 x double>, ptr %b 1919 %res = call <4 x double> @llvm.minimum.v4f64(<4 x double> %op1, <4 x double> %op2) 1920 store <4 x double> %res, ptr %a 1921 ret void 1922} 1923 1924declare <4 x half> @llvm.minnum.v4f16(<4 x half>, <4 x half>) 1925declare <8 x half> @llvm.minnum.v8f16(<8 x half>, <8 x half>) 1926declare <16 x half> @llvm.minnum.v16f16(<16 x half>, <16 x half>) 1927declare <2 x float> @llvm.minnum.v2f32(<2 x float>, <2 x float>) 1928declare <4 x float> @llvm.minnum.v4f32(<4 x float>, <4 x float>) 1929declare <8 x float> @llvm.minnum.v8f32(<8 x float>, <8 x float>) 1930declare <1 x double> @llvm.minnum.v1f64(<1 x double>, <1 x double>) 1931declare <2 x double> @llvm.minnum.v2f64(<2 x double>, <2 x double>) 1932declare <4 x double> @llvm.minnum.v4f64(<4 x double>, <4 x double>) 1933 1934declare <4 x half> @llvm.maxnum.v4f16(<4 x half>, <4 x half>) 1935declare <8 x half> @llvm.maxnum.v8f16(<8 x half>, <8 x half>) 1936declare <16 x half> @llvm.maxnum.v16f16(<16 x half>, <16 x half>) 1937declare <2 x float> @llvm.maxnum.v2f32(<2 x float>, <2 x float>) 1938declare <4 x float> @llvm.maxnum.v4f32(<4 x float>, <4 x float>) 1939declare <8 x float> @llvm.maxnum.v8f32(<8 x float>, <8 x float>) 1940declare <1 x double> @llvm.maxnum.v1f64(<1 x double>, <1 x double>) 1941declare <2 x double> @llvm.maxnum.v2f64(<2 x double>, <2 x double>) 1942declare <4 x double> @llvm.maxnum.v4f64(<4 x double>, <4 x double>) 1943 1944declare <4 x half> @llvm.minimum.v4f16(<4 x half>, <4 x half>) 1945declare <8 x half> @llvm.minimum.v8f16(<8 x half>, <8 x half>) 1946declare <16 x half> @llvm.minimum.v16f16(<16 x half>, <16 x half>) 1947declare <2 x float> @llvm.minimum.v2f32(<2 x float>, <2 x float>) 1948declare <4 x float> @llvm.minimum.v4f32(<4 x float>, <4 x float>) 1949declare <8 x float> @llvm.minimum.v8f32(<8 x float>, <8 x float>) 1950declare <1 x double> @llvm.minimum.v1f64(<1 x double>, <1 x double>) 1951declare <2 x double> @llvm.minimum.v2f64(<2 x double>, <2 x double>) 1952declare <4 x double> @llvm.minimum.v4f64(<4 x double>, <4 x double>) 1953 1954declare <4 x half> @llvm.maximum.v4f16(<4 x half>, <4 x half>) 1955declare <8 x half> @llvm.maximum.v8f16(<8 x half>, <8 x half>) 1956declare <16 x half> @llvm.maximum.v16f16(<16 x half>, <16 x half>) 1957declare <2 x float> @llvm.maximum.v2f32(<2 x float>, <2 x float>) 1958declare <4 x float> @llvm.maximum.v4f32(<4 x float>, <4 x float>) 1959declare <8 x float> @llvm.maximum.v8f32(<8 x float>, <8 x float>) 1960declare <1 x double> @llvm.maximum.v1f64(<1 x double>, <1 x double>) 1961declare <2 x double> @llvm.maximum.v2f64(<2 x double>, <2 x double>) 1962declare <4 x double> @llvm.maximum.v4f64(<4 x double>, <4 x double>) 1963