1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 2; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=-lzcnt,+sse2 | FileCheck %s -check-prefixes=CHECK,NOLZCNT 3; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=+lzcnt,+sse2 | FileCheck %s -check-prefixes=CHECK,LZCNT,SSE2 4; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=+lzcnt,+sse4.2 | FileCheck %s -check-prefixes=CHECK,LZCNT,SSE42 5; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=+lzcnt,+avx | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX,AVX1 6; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=+lzcnt,+avx2 | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX,AVX2 7; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=+lzcnt,+avx512f | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX512,AVX512F 8; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=+lzcnt,+avx512vl,+avx512bw,+avx512dq | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX512,AVX512BW 9; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=latency -mattr=+lzcnt,+avx512vl,+avx512bw,+avx512dq,+avx512cd | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX512CD 10 11; Verify the cost of scalar leading zero count instructions. 12 13declare i64 @llvm.ctlz.i64(i64, i1) 14declare i32 @llvm.ctlz.i32(i32, i1) 15declare i16 @llvm.ctlz.i16(i16, i1) 16declare i8 @llvm.ctlz.i8(i8, i1) 17 18define i64 @var_ctlz_i64(i64 %a) { 19; NOLZCNT-LABEL: 'var_ctlz_i64' 20; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 false) 21; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz 22; 23; LZCNT-LABEL: 'var_ctlz_i64' 24; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 false) 25; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz 26; 27 %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 0) 28 ret i64 %ctlz 29} 30 31define i64 @var_ctlz_i64u(i64 %a) { 32; NOLZCNT-LABEL: 'var_ctlz_i64u' 33; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 true) 34; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz 35; 36; LZCNT-LABEL: 'var_ctlz_i64u' 37; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 true) 38; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz 39; 40 %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 1) 41 ret i64 %ctlz 42} 43 44define i32 @var_ctlz_i32(i32 %a) { 45; NOLZCNT-LABEL: 'var_ctlz_i32' 46; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 false) 47; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz 48; 49; LZCNT-LABEL: 'var_ctlz_i32' 50; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 false) 51; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz 52; 53 %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 0) 54 ret i32 %ctlz 55} 56 57define i32 @var_ctlz_i32u(i32 %a) { 58; NOLZCNT-LABEL: 'var_ctlz_i32u' 59; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 true) 60; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz 61; 62; LZCNT-LABEL: 'var_ctlz_i32u' 63; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 true) 64; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz 65; 66 %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 1) 67 ret i32 %ctlz 68} 69 70define i16 @var_ctlz_i16(i16 %a) { 71; NOLZCNT-LABEL: 'var_ctlz_i16' 72; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 false) 73; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz 74; 75; LZCNT-LABEL: 'var_ctlz_i16' 76; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 false) 77; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz 78; 79 %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 0) 80 ret i16 %ctlz 81} 82 83define i16 @var_ctlz_i16u(i16 %a) { 84; NOLZCNT-LABEL: 'var_ctlz_i16u' 85; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 true) 86; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz 87; 88; LZCNT-LABEL: 'var_ctlz_i16u' 89; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 true) 90; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz 91; 92 %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 1) 93 ret i16 %ctlz 94} 95 96define i8 @var_ctlz_i8(i8 %a) { 97; NOLZCNT-LABEL: 'var_ctlz_i8' 98; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 false) 99; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz 100; 101; LZCNT-LABEL: 'var_ctlz_i8' 102; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 false) 103; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz 104; 105 %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 0) 106 ret i8 %ctlz 107} 108 109define i8 @var_ctlz_i8u(i8 %a) { 110; NOLZCNT-LABEL: 'var_ctlz_i8u' 111; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 true) 112; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz 113; 114; LZCNT-LABEL: 'var_ctlz_i8u' 115; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 true) 116; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz 117; 118 %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 1) 119 ret i8 %ctlz 120} 121 122; Verify the cost of vector leading zero count instructions. 123 124declare <2 x i64> @llvm.ctlz.v2i64(<2 x i64>, i1) 125declare <4 x i32> @llvm.ctlz.v4i32(<4 x i32>, i1) 126declare <8 x i16> @llvm.ctlz.v8i16(<8 x i16>, i1) 127declare <16 x i8> @llvm.ctlz.v16i8(<16 x i8>, i1) 128 129declare <4 x i64> @llvm.ctlz.v4i64(<4 x i64>, i1) 130declare <8 x i32> @llvm.ctlz.v8i32(<8 x i32>, i1) 131declare <16 x i16> @llvm.ctlz.v16i16(<16 x i16>, i1) 132declare <32 x i8> @llvm.ctlz.v32i8(<32 x i8>, i1) 133 134declare <8 x i64> @llvm.ctlz.v8i64(<8 x i64>, i1) 135declare <16 x i32> @llvm.ctlz.v16i32(<16 x i32>, i1) 136declare <32 x i16> @llvm.ctlz.v32i16(<32 x i16>, i1) 137declare <64 x i8> @llvm.ctlz.v64i8(<64 x i8>, i1) 138 139define <2 x i64> @var_ctlz_v2i64(<2 x i64> %a) { 140; NOLZCNT-LABEL: 'var_ctlz_v2i64' 141; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false) 142; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 143; 144; SSE2-LABEL: 'var_ctlz_v2i64' 145; SSE2-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false) 146; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 147; 148; SSE42-LABEL: 'var_ctlz_v2i64' 149; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false) 150; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 151; 152; AVX1-LABEL: 'var_ctlz_v2i64' 153; AVX1-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false) 154; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 155; 156; AVX2-LABEL: 'var_ctlz_v2i64' 157; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false) 158; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 159; 160; AVX512-LABEL: 'var_ctlz_v2i64' 161; AVX512-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false) 162; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 163; 164; AVX512CD-LABEL: 'var_ctlz_v2i64' 165; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false) 166; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 167; 168 %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 0) 169 ret <2 x i64> %ctlz 170} 171 172define <2 x i64> @var_ctlz_v2i64u(<2 x i64> %a) { 173; NOLZCNT-LABEL: 'var_ctlz_v2i64u' 174; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true) 175; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 176; 177; SSE2-LABEL: 'var_ctlz_v2i64u' 178; SSE2-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true) 179; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 180; 181; SSE42-LABEL: 'var_ctlz_v2i64u' 182; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true) 183; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 184; 185; AVX1-LABEL: 'var_ctlz_v2i64u' 186; AVX1-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true) 187; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 188; 189; AVX2-LABEL: 'var_ctlz_v2i64u' 190; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true) 191; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 192; 193; AVX512-LABEL: 'var_ctlz_v2i64u' 194; AVX512-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true) 195; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 196; 197; AVX512CD-LABEL: 'var_ctlz_v2i64u' 198; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true) 199; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz 200; 201 %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 1) 202 ret <2 x i64> %ctlz 203} 204 205define <4 x i64> @var_ctlz_v4i64(<4 x i64> %a) { 206; NOLZCNT-LABEL: 'var_ctlz_v4i64' 207; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false) 208; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 209; 210; SSE2-LABEL: 'var_ctlz_v4i64' 211; SSE2-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false) 212; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 213; 214; SSE42-LABEL: 'var_ctlz_v4i64' 215; SSE42-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false) 216; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 217; 218; AVX1-LABEL: 'var_ctlz_v4i64' 219; AVX1-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false) 220; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 221; 222; AVX2-LABEL: 'var_ctlz_v4i64' 223; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false) 224; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 225; 226; AVX512-LABEL: 'var_ctlz_v4i64' 227; AVX512-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false) 228; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 229; 230; AVX512CD-LABEL: 'var_ctlz_v4i64' 231; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false) 232; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 233; 234 %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 0) 235 ret <4 x i64> %ctlz 236} 237 238define <4 x i64> @var_ctlz_v4i64u(<4 x i64> %a) { 239; NOLZCNT-LABEL: 'var_ctlz_v4i64u' 240; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true) 241; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 242; 243; SSE2-LABEL: 'var_ctlz_v4i64u' 244; SSE2-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true) 245; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 246; 247; SSE42-LABEL: 'var_ctlz_v4i64u' 248; SSE42-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true) 249; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 250; 251; AVX1-LABEL: 'var_ctlz_v4i64u' 252; AVX1-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true) 253; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 254; 255; AVX2-LABEL: 'var_ctlz_v4i64u' 256; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true) 257; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 258; 259; AVX512-LABEL: 'var_ctlz_v4i64u' 260; AVX512-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true) 261; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 262; 263; AVX512CD-LABEL: 'var_ctlz_v4i64u' 264; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true) 265; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz 266; 267 %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 1) 268 ret <4 x i64> %ctlz 269} 270 271define <8 x i64> @var_ctlz_v8i64(<8 x i64> %a) { 272; NOLZCNT-LABEL: 'var_ctlz_v8i64' 273; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 274; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 275; 276; SSE2-LABEL: 'var_ctlz_v8i64' 277; SSE2-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 278; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 279; 280; SSE42-LABEL: 'var_ctlz_v8i64' 281; SSE42-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 282; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 283; 284; AVX1-LABEL: 'var_ctlz_v8i64' 285; AVX1-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 286; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 287; 288; AVX2-LABEL: 'var_ctlz_v8i64' 289; AVX2-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 290; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 291; 292; AVX512F-LABEL: 'var_ctlz_v8i64' 293; AVX512F-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 294; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 295; 296; AVX512BW-LABEL: 'var_ctlz_v8i64' 297; AVX512BW-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 298; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 299; 300; AVX512CD-LABEL: 'var_ctlz_v8i64' 301; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false) 302; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 303; 304 %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 0) 305 ret <8 x i64> %ctlz 306} 307 308define <8 x i64> @var_ctlz_v8i64u(<8 x i64> %a) { 309; NOLZCNT-LABEL: 'var_ctlz_v8i64u' 310; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 311; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 312; 313; SSE2-LABEL: 'var_ctlz_v8i64u' 314; SSE2-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 315; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 316; 317; SSE42-LABEL: 'var_ctlz_v8i64u' 318; SSE42-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 319; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 320; 321; AVX1-LABEL: 'var_ctlz_v8i64u' 322; AVX1-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 323; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 324; 325; AVX2-LABEL: 'var_ctlz_v8i64u' 326; AVX2-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 327; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 328; 329; AVX512F-LABEL: 'var_ctlz_v8i64u' 330; AVX512F-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 331; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 332; 333; AVX512BW-LABEL: 'var_ctlz_v8i64u' 334; AVX512BW-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 335; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 336; 337; AVX512CD-LABEL: 'var_ctlz_v8i64u' 338; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true) 339; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz 340; 341 %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 1) 342 ret <8 x i64> %ctlz 343} 344 345define <4 x i32> @var_ctlz_v4i32(<4 x i32> %a) { 346; NOLZCNT-LABEL: 'var_ctlz_v4i32' 347; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false) 348; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 349; 350; SSE2-LABEL: 'var_ctlz_v4i32' 351; SSE2-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false) 352; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 353; 354; SSE42-LABEL: 'var_ctlz_v4i32' 355; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false) 356; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 357; 358; AVX1-LABEL: 'var_ctlz_v4i32' 359; AVX1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false) 360; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 361; 362; AVX2-LABEL: 'var_ctlz_v4i32' 363; AVX2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false) 364; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 365; 366; AVX512-LABEL: 'var_ctlz_v4i32' 367; AVX512-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false) 368; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 369; 370; AVX512CD-LABEL: 'var_ctlz_v4i32' 371; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false) 372; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 373; 374 %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 0) 375 ret <4 x i32> %ctlz 376} 377 378define <4 x i32> @var_ctlz_v4i32u(<4 x i32> %a) { 379; NOLZCNT-LABEL: 'var_ctlz_v4i32u' 380; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true) 381; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 382; 383; SSE2-LABEL: 'var_ctlz_v4i32u' 384; SSE2-NEXT: Cost Model: Found an estimated cost of 45 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true) 385; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 386; 387; SSE42-LABEL: 'var_ctlz_v4i32u' 388; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true) 389; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 390; 391; AVX1-LABEL: 'var_ctlz_v4i32u' 392; AVX1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true) 393; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 394; 395; AVX2-LABEL: 'var_ctlz_v4i32u' 396; AVX2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true) 397; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 398; 399; AVX512-LABEL: 'var_ctlz_v4i32u' 400; AVX512-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true) 401; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 402; 403; AVX512CD-LABEL: 'var_ctlz_v4i32u' 404; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true) 405; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz 406; 407 %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 1) 408 ret <4 x i32> %ctlz 409} 410 411define <8 x i32> @var_ctlz_v8i32(<8 x i32> %a) { 412; NOLZCNT-LABEL: 'var_ctlz_v8i32' 413; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false) 414; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 415; 416; SSE2-LABEL: 'var_ctlz_v8i32' 417; SSE2-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false) 418; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 419; 420; SSE42-LABEL: 'var_ctlz_v8i32' 421; SSE42-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false) 422; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 423; 424; AVX1-LABEL: 'var_ctlz_v8i32' 425; AVX1-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false) 426; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 427; 428; AVX2-LABEL: 'var_ctlz_v8i32' 429; AVX2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false) 430; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 431; 432; AVX512-LABEL: 'var_ctlz_v8i32' 433; AVX512-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false) 434; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 435; 436; AVX512CD-LABEL: 'var_ctlz_v8i32' 437; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false) 438; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 439; 440 %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 0) 441 ret <8 x i32> %ctlz 442} 443 444define <8 x i32> @var_ctlz_v8i32u(<8 x i32> %a) { 445; NOLZCNT-LABEL: 'var_ctlz_v8i32u' 446; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true) 447; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 448; 449; SSE2-LABEL: 'var_ctlz_v8i32u' 450; SSE2-NEXT: Cost Model: Found an estimated cost of 90 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true) 451; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 452; 453; SSE42-LABEL: 'var_ctlz_v8i32u' 454; SSE42-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true) 455; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 456; 457; AVX1-LABEL: 'var_ctlz_v8i32u' 458; AVX1-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true) 459; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 460; 461; AVX2-LABEL: 'var_ctlz_v8i32u' 462; AVX2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true) 463; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 464; 465; AVX512-LABEL: 'var_ctlz_v8i32u' 466; AVX512-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true) 467; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 468; 469; AVX512CD-LABEL: 'var_ctlz_v8i32u' 470; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true) 471; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz 472; 473 %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 1) 474 ret <8 x i32> %ctlz 475} 476 477define <16 x i32> @var_ctlz_v16i32(<16 x i32> %a) { 478; NOLZCNT-LABEL: 'var_ctlz_v16i32' 479; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 480; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 481; 482; SSE2-LABEL: 'var_ctlz_v16i32' 483; SSE2-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 484; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 485; 486; SSE42-LABEL: 'var_ctlz_v16i32' 487; SSE42-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 488; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 489; 490; AVX1-LABEL: 'var_ctlz_v16i32' 491; AVX1-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 492; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 493; 494; AVX2-LABEL: 'var_ctlz_v16i32' 495; AVX2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 496; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 497; 498; AVX512F-LABEL: 'var_ctlz_v16i32' 499; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 500; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 501; 502; AVX512BW-LABEL: 'var_ctlz_v16i32' 503; AVX512BW-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 504; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 505; 506; AVX512CD-LABEL: 'var_ctlz_v16i32' 507; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false) 508; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 509; 510 %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 0) 511 ret <16 x i32> %ctlz 512} 513 514define <16 x i32> @var_ctlz_v16i32u(<16 x i32> %a) { 515; NOLZCNT-LABEL: 'var_ctlz_v16i32u' 516; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 517; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 518; 519; SSE2-LABEL: 'var_ctlz_v16i32u' 520; SSE2-NEXT: Cost Model: Found an estimated cost of 180 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 521; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 522; 523; SSE42-LABEL: 'var_ctlz_v16i32u' 524; SSE42-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 525; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 526; 527; AVX1-LABEL: 'var_ctlz_v16i32u' 528; AVX1-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 529; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 530; 531; AVX2-LABEL: 'var_ctlz_v16i32u' 532; AVX2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 533; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 534; 535; AVX512F-LABEL: 'var_ctlz_v16i32u' 536; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 537; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 538; 539; AVX512BW-LABEL: 'var_ctlz_v16i32u' 540; AVX512BW-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 541; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 542; 543; AVX512CD-LABEL: 'var_ctlz_v16i32u' 544; AVX512CD-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true) 545; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz 546; 547 %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 1) 548 ret <16 x i32> %ctlz 549} 550 551define <8 x i16> @var_ctlz_v8i16(<8 x i16> %a) { 552; NOLZCNT-LABEL: 'var_ctlz_v8i16' 553; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false) 554; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 555; 556; SSE2-LABEL: 'var_ctlz_v8i16' 557; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false) 558; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 559; 560; SSE42-LABEL: 'var_ctlz_v8i16' 561; SSE42-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false) 562; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 563; 564; AVX1-LABEL: 'var_ctlz_v8i16' 565; AVX1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false) 566; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 567; 568; AVX2-LABEL: 'var_ctlz_v8i16' 569; AVX2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false) 570; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 571; 572; AVX512-LABEL: 'var_ctlz_v8i16' 573; AVX512-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false) 574; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 575; 576; AVX512CD-LABEL: 'var_ctlz_v8i16' 577; AVX512CD-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false) 578; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 579; 580 %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 0) 581 ret <8 x i16> %ctlz 582} 583 584define <8 x i16> @var_ctlz_v8i16u(<8 x i16> %a) { 585; NOLZCNT-LABEL: 'var_ctlz_v8i16u' 586; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true) 587; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 588; 589; SSE2-LABEL: 'var_ctlz_v8i16u' 590; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true) 591; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 592; 593; SSE42-LABEL: 'var_ctlz_v8i16u' 594; SSE42-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true) 595; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 596; 597; AVX1-LABEL: 'var_ctlz_v8i16u' 598; AVX1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true) 599; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 600; 601; AVX2-LABEL: 'var_ctlz_v8i16u' 602; AVX2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true) 603; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 604; 605; AVX512-LABEL: 'var_ctlz_v8i16u' 606; AVX512-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true) 607; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 608; 609; AVX512CD-LABEL: 'var_ctlz_v8i16u' 610; AVX512CD-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true) 611; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz 612; 613 %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 1) 614 ret <8 x i16> %ctlz 615} 616 617define <16 x i16> @var_ctlz_v16i16(<16 x i16> %a) { 618; NOLZCNT-LABEL: 'var_ctlz_v16i16' 619; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false) 620; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 621; 622; SSE2-LABEL: 'var_ctlz_v16i16' 623; SSE2-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false) 624; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 625; 626; SSE42-LABEL: 'var_ctlz_v16i16' 627; SSE42-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false) 628; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 629; 630; AVX1-LABEL: 'var_ctlz_v16i16' 631; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false) 632; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 633; 634; AVX2-LABEL: 'var_ctlz_v16i16' 635; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false) 636; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 637; 638; AVX512-LABEL: 'var_ctlz_v16i16' 639; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false) 640; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 641; 642; AVX512CD-LABEL: 'var_ctlz_v16i16' 643; AVX512CD-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false) 644; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 645; 646 %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 0) 647 ret <16 x i16> %ctlz 648} 649 650define <16 x i16> @var_ctlz_v16i16u(<16 x i16> %a) { 651; NOLZCNT-LABEL: 'var_ctlz_v16i16u' 652; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true) 653; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 654; 655; SSE2-LABEL: 'var_ctlz_v16i16u' 656; SSE2-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true) 657; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 658; 659; SSE42-LABEL: 'var_ctlz_v16i16u' 660; SSE42-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true) 661; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 662; 663; AVX1-LABEL: 'var_ctlz_v16i16u' 664; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true) 665; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 666; 667; AVX2-LABEL: 'var_ctlz_v16i16u' 668; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true) 669; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 670; 671; AVX512-LABEL: 'var_ctlz_v16i16u' 672; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true) 673; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 674; 675; AVX512CD-LABEL: 'var_ctlz_v16i16u' 676; AVX512CD-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true) 677; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz 678; 679 %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 1) 680 ret <16 x i16> %ctlz 681} 682 683define <32 x i16> @var_ctlz_v32i16(<32 x i16> %a) { 684; NOLZCNT-LABEL: 'var_ctlz_v32i16' 685; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false) 686; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 687; 688; SSE2-LABEL: 'var_ctlz_v32i16' 689; SSE2-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false) 690; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 691; 692; SSE42-LABEL: 'var_ctlz_v32i16' 693; SSE42-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false) 694; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 695; 696; AVX1-LABEL: 'var_ctlz_v32i16' 697; AVX1-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false) 698; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 699; 700; AVX2-LABEL: 'var_ctlz_v32i16' 701; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false) 702; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 703; 704; AVX512-LABEL: 'var_ctlz_v32i16' 705; AVX512-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false) 706; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 707; 708; AVX512CD-LABEL: 'var_ctlz_v32i16' 709; AVX512CD-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false) 710; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 711; 712 %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 0) 713 ret <32 x i16> %ctlz 714} 715 716define <32 x i16> @var_ctlz_v32i16u(<32 x i16> %a) { 717; NOLZCNT-LABEL: 'var_ctlz_v32i16u' 718; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true) 719; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 720; 721; SSE2-LABEL: 'var_ctlz_v32i16u' 722; SSE2-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true) 723; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 724; 725; SSE42-LABEL: 'var_ctlz_v32i16u' 726; SSE42-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true) 727; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 728; 729; AVX1-LABEL: 'var_ctlz_v32i16u' 730; AVX1-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true) 731; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 732; 733; AVX2-LABEL: 'var_ctlz_v32i16u' 734; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true) 735; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 736; 737; AVX512-LABEL: 'var_ctlz_v32i16u' 738; AVX512-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true) 739; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 740; 741; AVX512CD-LABEL: 'var_ctlz_v32i16u' 742; AVX512CD-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true) 743; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz 744; 745 %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 1) 746 ret <32 x i16> %ctlz 747} 748 749define <16 x i8> @var_ctlz_v16i8(<16 x i8> %a) { 750; NOLZCNT-LABEL: 'var_ctlz_v16i8' 751; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false) 752; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 753; 754; SSE2-LABEL: 'var_ctlz_v16i8' 755; SSE2-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false) 756; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 757; 758; SSE42-LABEL: 'var_ctlz_v16i8' 759; SSE42-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false) 760; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 761; 762; AVX-LABEL: 'var_ctlz_v16i8' 763; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false) 764; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 765; 766; AVX512-LABEL: 'var_ctlz_v16i8' 767; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false) 768; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 769; 770; AVX512CD-LABEL: 'var_ctlz_v16i8' 771; AVX512CD-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false) 772; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 773; 774 %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 0) 775 ret <16 x i8> %ctlz 776} 777 778define <16 x i8> @var_ctlz_v16i8u(<16 x i8> %a) { 779; NOLZCNT-LABEL: 'var_ctlz_v16i8u' 780; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true) 781; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 782; 783; SSE2-LABEL: 'var_ctlz_v16i8u' 784; SSE2-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true) 785; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 786; 787; SSE42-LABEL: 'var_ctlz_v16i8u' 788; SSE42-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true) 789; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 790; 791; AVX-LABEL: 'var_ctlz_v16i8u' 792; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true) 793; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 794; 795; AVX512-LABEL: 'var_ctlz_v16i8u' 796; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true) 797; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 798; 799; AVX512CD-LABEL: 'var_ctlz_v16i8u' 800; AVX512CD-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true) 801; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz 802; 803 %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 1) 804 ret <16 x i8> %ctlz 805} 806 807define <32 x i8> @var_ctlz_v32i8(<32 x i8> %a) { 808; NOLZCNT-LABEL: 'var_ctlz_v32i8' 809; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 78 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false) 810; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 811; 812; SSE2-LABEL: 'var_ctlz_v32i8' 813; SSE2-NEXT: Cost Model: Found an estimated cost of 78 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false) 814; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 815; 816; SSE42-LABEL: 'var_ctlz_v32i8' 817; SSE42-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false) 818; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 819; 820; AVX1-LABEL: 'var_ctlz_v32i8' 821; AVX1-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false) 822; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 823; 824; AVX2-LABEL: 'var_ctlz_v32i8' 825; AVX2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false) 826; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 827; 828; AVX512-LABEL: 'var_ctlz_v32i8' 829; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false) 830; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 831; 832; AVX512CD-LABEL: 'var_ctlz_v32i8' 833; AVX512CD-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false) 834; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 835; 836 %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 0) 837 ret <32 x i8> %ctlz 838} 839 840define <32 x i8> @var_ctlz_v32i8u(<32 x i8> %a) { 841; NOLZCNT-LABEL: 'var_ctlz_v32i8u' 842; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 78 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true) 843; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 844; 845; SSE2-LABEL: 'var_ctlz_v32i8u' 846; SSE2-NEXT: Cost Model: Found an estimated cost of 78 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true) 847; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 848; 849; SSE42-LABEL: 'var_ctlz_v32i8u' 850; SSE42-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true) 851; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 852; 853; AVX1-LABEL: 'var_ctlz_v32i8u' 854; AVX1-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true) 855; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 856; 857; AVX2-LABEL: 'var_ctlz_v32i8u' 858; AVX2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true) 859; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 860; 861; AVX512-LABEL: 'var_ctlz_v32i8u' 862; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true) 863; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 864; 865; AVX512CD-LABEL: 'var_ctlz_v32i8u' 866; AVX512CD-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true) 867; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz 868; 869 %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 1) 870 ret <32 x i8> %ctlz 871} 872 873define <64 x i8> @var_ctlz_v64i8(<64 x i8> %a) { 874; NOLZCNT-LABEL: 'var_ctlz_v64i8' 875; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 156 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 876; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 877; 878; SSE2-LABEL: 'var_ctlz_v64i8' 879; SSE2-NEXT: Cost Model: Found an estimated cost of 156 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 880; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 881; 882; SSE42-LABEL: 'var_ctlz_v64i8' 883; SSE42-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 884; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 885; 886; AVX1-LABEL: 'var_ctlz_v64i8' 887; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 888; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 889; 890; AVX2-LABEL: 'var_ctlz_v64i8' 891; AVX2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 892; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 893; 894; AVX512F-LABEL: 'var_ctlz_v64i8' 895; AVX512F-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 896; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 897; 898; AVX512BW-LABEL: 'var_ctlz_v64i8' 899; AVX512BW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 900; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 901; 902; AVX512CD-LABEL: 'var_ctlz_v64i8' 903; AVX512CD-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false) 904; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 905; 906 %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 0) 907 ret <64 x i8> %ctlz 908} 909 910define <64 x i8> @var_ctlz_v64i8u(<64 x i8> %a) { 911; NOLZCNT-LABEL: 'var_ctlz_v64i8u' 912; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 156 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 913; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 914; 915; SSE2-LABEL: 'var_ctlz_v64i8u' 916; SSE2-NEXT: Cost Model: Found an estimated cost of 156 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 917; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 918; 919; SSE42-LABEL: 'var_ctlz_v64i8u' 920; SSE42-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 921; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 922; 923; AVX1-LABEL: 'var_ctlz_v64i8u' 924; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 925; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 926; 927; AVX2-LABEL: 'var_ctlz_v64i8u' 928; AVX2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 929; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 930; 931; AVX512F-LABEL: 'var_ctlz_v64i8u' 932; AVX512F-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 933; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 934; 935; AVX512BW-LABEL: 'var_ctlz_v64i8u' 936; AVX512BW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 937; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 938; 939; AVX512CD-LABEL: 'var_ctlz_v64i8u' 940; AVX512CD-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true) 941; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz 942; 943 %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 1) 944 ret <64 x i8> %ctlz 945} 946;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: 947; CHECK: {{.*}} 948