; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+sse2 | FileCheck %s --check-prefixes=CHECK,SSE,SSE2 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+ssse3 | FileCheck %s --check-prefixes=CHECK,SSE,SSE2 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+sse4.2 | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX1 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX2 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512F ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=CHECK,AVX512BW ; ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SLM ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE,SSE42 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.8.0 -passes="print" 2>&1 -disable-output -cost-kind=latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX1 define i32 @sdiv() { ; CHECK-LABEL: 'sdiv' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = sdiv <16 x i16> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = sdiv <32 x i16> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = sdiv <16 x i8> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = sdiv <32 x i8> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = sdiv <64 x i8> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = sdiv i64 undef, undef %V2i64 = sdiv <2 x i64> undef, undef %V4i64 = sdiv <4 x i64> undef, undef %V8i64 = sdiv <8 x i64> undef, undef %I32 = sdiv i32 undef, undef %V4i32 = sdiv <4 x i32> undef, undef %V8i32 = sdiv <8 x i32> undef, undef %V16i32 = sdiv <16 x i32> undef, undef %I16 = sdiv i16 undef, undef %V8i16 = sdiv <8 x i16> undef, undef %V16i16 = sdiv <16 x i16> undef, undef %V32i16 = sdiv <32 x i16> undef, undef %I8 = sdiv i8 undef, undef %V16i8 = sdiv <16 x i8> undef, undef %V32i8 = sdiv <32 x i8> undef, undef %V64i8 = sdiv <64 x i8> undef, undef ret i32 undef } define i32 @udiv() { ; CHECK-LABEL: 'udiv' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = udiv i64 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = udiv <2 x i64> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = udiv <4 x i64> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = udiv i32 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = udiv <4 x i32> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = udiv <8 x i32> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = udiv i16 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = udiv <8 x i16> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = udiv <16 x i16> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = udiv i8 undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = udiv <16 x i8> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = udiv <32 x i8> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = udiv <64 x i8> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = udiv i64 undef, undef %V2i64 = udiv <2 x i64> undef, undef %V4i64 = udiv <4 x i64> undef, undef %V8i64 = udiv <8 x i64> undef, undef %I32 = udiv i32 undef, undef %V4i32 = udiv <4 x i32> undef, undef %V8i32 = udiv <8 x i32> undef, undef %V16i32 = udiv <16 x i32> undef, undef %I16 = udiv i16 undef, undef %V8i16 = udiv <8 x i16> undef, undef %V16i16 = udiv <16 x i16> undef, undef %V32i16 = udiv <32 x i16> undef, undef %I8 = udiv i8 undef, undef %V16i8 = udiv <16 x i8> undef, undef %V32i8 = udiv <32 x i8> undef, undef %V64i8 = udiv <64 x i8> undef, undef ret i32 undef } define i32 @sdiv_const() { ; CHECK-LABEL: 'sdiv_const' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = sdiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = sdiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = sdiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = sdiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = sdiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = sdiv i64 undef, 7 %V2i64 = sdiv <2 x i64> undef, %V4i64 = sdiv <4 x i64> undef, %V8i64 = sdiv <8 x i64> undef, %I32 = sdiv i32 undef, 7 %V4i32 = sdiv <4 x i32> undef, %V8i32 = sdiv <8 x i32> undef, %V16i32 = sdiv <16 x i32> undef, %I16 = sdiv i16 undef, 7 %V8i16 = sdiv <8 x i16> undef, %V16i16 = sdiv <16 x i16> undef, %V32i16 = sdiv <32 x i16> undef, %I8 = sdiv i8 undef, 7 %V16i8 = sdiv <16 x i8> undef, %V32i8 = sdiv <32 x i8> undef, %V64i8 = sdiv <64 x i8> undef, ret i32 undef } define i32 @udiv_const() { ; CHECK-LABEL: 'udiv_const' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = udiv i64 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = udiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = udiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = udiv i32 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = udiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = udiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = udiv i16 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = udiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = udiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = udiv i8 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = udiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = udiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = udiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = udiv i64 undef, 7 %V2i64 = udiv <2 x i64> undef, %V4i64 = udiv <4 x i64> undef, %V8i64 = udiv <8 x i64> undef, %I32 = udiv i32 undef, 7 %V4i32 = udiv <4 x i32> undef, %V8i32 = udiv <8 x i32> undef, %V16i32 = udiv <16 x i32> undef, %I16 = udiv i16 undef, 7 %V8i16 = udiv <8 x i16> undef, %V16i16 = udiv <16 x i16> undef, %V32i16 = udiv <32 x i16> undef, %I8 = udiv i8 undef, 7 %V16i8 = udiv <16 x i8> undef, %V32i8 = udiv <32 x i8> undef, %V64i8 = udiv <64 x i8> undef, ret i32 undef } define i32 @sdiv_uniformconst() { ; CHECK-LABEL: 'sdiv_uniformconst' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = sdiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = sdiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = sdiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = sdiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = sdiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = sdiv i64 undef, 7 %V2i64 = sdiv <2 x i64> undef, %V4i64 = sdiv <4 x i64> undef, %V8i64 = sdiv <8 x i64> undef, %I32 = sdiv i32 undef, 7 %V4i32 = sdiv <4 x i32> undef, %V8i32 = sdiv <8 x i32> undef, %V16i32 = sdiv <16 x i32> undef, %I16 = sdiv i16 undef, 7 %V8i16 = sdiv <8 x i16> undef, %V16i16 = sdiv <16 x i16> undef, %V32i16 = sdiv <32 x i16> undef, %I8 = sdiv i8 undef, 7 %V16i8 = sdiv <16 x i8> undef, %V32i8 = sdiv <32 x i8> undef, %V64i8 = sdiv <64 x i8> undef, ret i32 undef } define i32 @udiv_uniformconst() { ; CHECK-LABEL: 'udiv_uniformconst' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = udiv i64 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = udiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = udiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = udiv i32 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = udiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = udiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = udiv i16 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = udiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = udiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = udiv i8 undef, 7 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = udiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = udiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = udiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = udiv i64 undef, 7 %V2i64 = udiv <2 x i64> undef, %V4i64 = udiv <4 x i64> undef, %V8i64 = udiv <8 x i64> undef, %I32 = udiv i32 undef, 7 %V4i32 = udiv <4 x i32> undef, %V8i32 = udiv <8 x i32> undef, %V16i32 = udiv <16 x i32> undef, %I16 = udiv i16 undef, 7 %V8i16 = udiv <8 x i16> undef, %V16i16 = udiv <16 x i16> undef, %V32i16 = udiv <32 x i16> undef, %I8 = udiv i8 undef, 7 %V16i8 = udiv <16 x i8> undef, %V32i8 = udiv <32 x i8> undef, %V64i8 = udiv <64 x i8> undef, ret i32 undef } define i32 @sdiv_constpow2() { ; SSE2-LABEL: 'sdiv_constpow2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V2i64 = sdiv <2 x i64> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V4i64 = sdiv <4 x i64> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 120 for instruction: %V8i64 = sdiv <8 x i64> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %V4i32 = sdiv <4 x i32> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 73 for instruction: %V8i32 = sdiv <8 x i32> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 145 for instruction: %V16i32 = sdiv <16 x i32> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V8i16 = sdiv <8 x i16> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 115 for instruction: %V16i16 = sdiv <16 x i16> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 229 for instruction: %V32i16 = sdiv <32 x i16> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 89 for instruction: %V16i8 = sdiv <16 x i8> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 177 for instruction: %V32i8 = sdiv <32 x i8> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 353 for instruction: %V64i8 = sdiv <64 x i8> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; SSE42-LABEL: 'sdiv_constpow2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %V2i64 = sdiv <2 x i64> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 84 for instruction: %V4i64 = sdiv <4 x i64> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 168 for instruction: %V8i64 = sdiv <8 x i64> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V4i32 = sdiv <4 x i32> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %V8i32 = sdiv <8 x i32> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 205 for instruction: %V16i32 = sdiv <16 x i32> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 79 for instruction: %V8i16 = sdiv <8 x i16> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 157 for instruction: %V16i16 = sdiv <16 x i16> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 313 for instruction: %V32i16 = sdiv <32 x i16> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 110 for instruction: %V16i8 = sdiv <16 x i8> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 219 for instruction: %V32i8 = sdiv <32 x i8> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 437 for instruction: %V64i8 = sdiv <64 x i8> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX1-LABEL: 'sdiv_constpow2' ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 66 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 92 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 184 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 115 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 230 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX2-LABEL: 'sdiv_constpow2' ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 142 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512F-LABEL: 'sdiv_constpow2' ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 55 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 71 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 100 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512BW-LABEL: 'sdiv_constpow2' ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 57 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; SLM-LABEL: 'sdiv_constpow2' ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %V2i64 = sdiv <2 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 84 for instruction: %V4i64 = sdiv <4 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 168 for instruction: %V8i64 = sdiv <8 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V4i32 = sdiv <4 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 103 for instruction: %V8i32 = sdiv <8 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 205 for instruction: %V16i32 = sdiv <16 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 79 for instruction: %V8i16 = sdiv <8 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 157 for instruction: %V16i16 = sdiv <16 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 313 for instruction: %V32i16 = sdiv <32 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 110 for instruction: %V16i8 = sdiv <16 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 219 for instruction: %V32i8 = sdiv <32 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 437 for instruction: %V64i8 = sdiv <64 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = sdiv i64 undef, 16 %V2i64 = sdiv <2 x i64> undef, %V4i64 = sdiv <4 x i64> undef, %V8i64 = sdiv <8 x i64> undef, %I32 = sdiv i32 undef, 16 %V4i32 = sdiv <4 x i32> undef, %V8i32 = sdiv <8 x i32> undef, %V16i32 = sdiv <16 x i32> undef, %I16 = sdiv i16 undef, 16 %V8i16 = sdiv <8 x i16> undef, %V16i16 = sdiv <16 x i16> undef, %V32i16 = sdiv <32 x i16> undef, %I8 = sdiv i8 undef, 16 %V16i8 = sdiv <16 x i8> undef, %V32i8 = sdiv <32 x i8> undef, %V64i8 = sdiv <64 x i8> undef, ret i32 undef } define i32 @udiv_constpow2() { ; SSE2-LABEL: 'udiv_constpow2' ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2i64 = udiv <2 x i64> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4i64 = udiv <4 x i64> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8i64 = udiv <8 x i64> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4i32 = udiv <4 x i32> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8i32 = udiv <8 x i32> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V16i32 = udiv <16 x i32> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %V8i16 = udiv <8 x i16> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %V16i16 = udiv <16 x i16> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %V32i16 = udiv <32 x i16> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V16i8 = udiv <16 x i8> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V32i8 = udiv <32 x i8> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %V64i8 = udiv <64 x i8> undef, ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; SSE42-LABEL: 'udiv_constpow2' ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2i64 = udiv <2 x i64> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4i64 = udiv <4 x i64> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8i64 = udiv <8 x i64> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %V4i32 = udiv <4 x i32> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V8i32 = udiv <8 x i32> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V16i32 = udiv <16 x i32> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V8i16 = udiv <8 x i16> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V16i16 = udiv <16 x i16> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 104 for instruction: %V32i16 = udiv <32 x i16> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; SSE42-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V16i8 = udiv <16 x i8> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %V32i8 = udiv <32 x i8> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %V64i8 = udiv <64 x i8> undef, ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX1-LABEL: 'udiv_constpow2' ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX2-LABEL: 'udiv_constpow2' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512F-LABEL: 'udiv_constpow2' ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512BW-LABEL: 'udiv_constpow2' ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; SLM-LABEL: 'udiv_constpow2' ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V2i64 = udiv <2 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4i64 = udiv <4 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8i64 = udiv <8 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %V4i32 = udiv <4 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %V8i32 = udiv <8 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %V16i32 = udiv <16 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V8i16 = udiv <8 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V16i16 = udiv <16 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 104 for instruction: %V32i16 = udiv <32 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V16i8 = udiv <16 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %V32i8 = udiv <32 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %V64i8 = udiv <64 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = udiv i64 undef, 16 %V2i64 = udiv <2 x i64> undef, %V4i64 = udiv <4 x i64> undef, %V8i64 = udiv <8 x i64> undef, %I32 = udiv i32 undef, 16 %V4i32 = udiv <4 x i32> undef, %V8i32 = udiv <8 x i32> undef, %V16i32 = udiv <16 x i32> undef, %I16 = udiv i16 undef, 16 %V8i16 = udiv <8 x i16> undef, %V16i16 = udiv <16 x i16> undef, %V32i16 = udiv <32 x i16> undef, %I8 = udiv i8 undef, 16 %V16i8 = udiv <16 x i8> undef, %V32i8 = udiv <32 x i8> undef, %V64i8 = udiv <64 x i8> undef, ret i32 undef } define i32 @sdiv_uniformconstpow2() { ; SSE-LABEL: 'sdiv_uniformconstpow2' ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2i64 = sdiv <2 x i64> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V4i64 = sdiv <4 x i64> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V8i64 = sdiv <8 x i64> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8i32 = sdiv <8 x i32> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16i32 = sdiv <16 x i32> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i16 = sdiv <16 x i16> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V32i16 = sdiv <32 x i16> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V16i8 = sdiv <16 x i8> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V32i8 = sdiv <32 x i8> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %V64i8 = sdiv <64 x i8> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX1-LABEL: 'sdiv_uniformconstpow2' ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX2-LABEL: 'sdiv_uniformconstpow2' ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512F-LABEL: 'sdiv_uniformconstpow2' ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 37 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512BW-LABEL: 'sdiv_uniformconstpow2' ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = sdiv <16 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = sdiv <32 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V16i8 = sdiv <16 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V32i8 = sdiv <32 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %V64i8 = sdiv <64 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; SLM-LABEL: 'sdiv_uniformconstpow2' ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V2i64 = sdiv <2 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V4i64 = sdiv <4 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %V8i64 = sdiv <8 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V8i32 = sdiv <8 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V16i32 = sdiv <16 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i16 = sdiv <16 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %V32i16 = sdiv <32 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %V16i8 = sdiv <16 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 51 for instruction: %V32i8 = sdiv <32 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 101 for instruction: %V64i8 = sdiv <64 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = sdiv i64 undef, 16 %V2i64 = sdiv <2 x i64> undef, %V4i64 = sdiv <4 x i64> undef, %V8i64 = sdiv <8 x i64> undef, %I32 = sdiv i32 undef, 16 %V4i32 = sdiv <4 x i32> undef, %V8i32 = sdiv <8 x i32> undef, %V16i32 = sdiv <16 x i32> undef, %I16 = sdiv i16 undef, 16 %V8i16 = sdiv <8 x i16> undef, %V16i16 = sdiv <16 x i16> undef, %V32i16 = sdiv <32 x i16> undef, %I8 = sdiv i8 undef, 16 %V16i8 = sdiv <16 x i8> undef, %V32i8 = sdiv <32 x i8> undef, %V64i8 = sdiv <64 x i8> undef, ret i32 undef } define i32 @udiv_uniformconstpow2() { ; SSE-LABEL: 'udiv_uniformconstpow2' ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = udiv <2 x i64> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i64 = udiv <4 x i64> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = udiv <4 x i32> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i32 = udiv <8 x i32> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = udiv <8 x i16> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i16 = udiv <16 x i16> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; SSE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i8 = udiv <16 x i8> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V32i8 = udiv <32 x i8> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V64i8 = udiv <64 x i8> undef, ; SSE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX1-LABEL: 'udiv_uniformconstpow2' ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX2-LABEL: 'udiv_uniformconstpow2' ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512F-LABEL: 'udiv_uniformconstpow2' ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; AVX512BW-LABEL: 'udiv_uniformconstpow2' ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = udiv <2 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i64 = udiv <4 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i64 = udiv <8 x i64> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = udiv <4 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i32 = udiv <8 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i32 = udiv <16 x i32> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = udiv <8 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16i16 = udiv <16 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32i16 = udiv <32 x i16> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i8 = udiv <16 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V32i8 = udiv <32 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %V64i8 = udiv <64 x i8> undef, ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; ; SLM-LABEL: 'udiv_uniformconstpow2' ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2i64 = udiv <2 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V4i64 = udiv <4 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = udiv i32 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4i32 = udiv <4 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V8i32 = udiv <8 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = udiv i16 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8i16 = udiv <8 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V16i16 = udiv <16 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = udiv i8 undef, 16 ; SLM-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V16i8 = udiv <16 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V32i8 = udiv <32 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V64i8 = udiv <64 x i8> undef, ; SLM-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = udiv i64 undef, 16 %V2i64 = udiv <2 x i64> undef, %V4i64 = udiv <4 x i64> undef, %V8i64 = udiv <8 x i64> undef, %I32 = udiv i32 undef, 16 %V4i32 = udiv <4 x i32> undef, %V8i32 = udiv <8 x i32> undef, %V16i32 = udiv <16 x i32> undef, %I16 = udiv i16 undef, 16 %V8i16 = udiv <8 x i16> undef, %V16i16 = udiv <16 x i16> undef, %V32i16 = udiv <32 x i16> undef, %I8 = udiv i8 undef, 16 %V16i8 = udiv <16 x i8> undef, %V32i8 = udiv <32 x i8> undef, %V64i8 = udiv <64 x i8> undef, ret i32 undef } define i32 @sdiv_constnegpow2() { ; CHECK-LABEL: 'sdiv_constnegpow2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = sdiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = sdiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = sdiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = sdiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = sdiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = sdiv i64 undef, -16 %V2i64 = sdiv <2 x i64> undef, %V4i64 = sdiv <4 x i64> undef, %V8i64 = sdiv <8 x i64> undef, %I32 = sdiv i32 undef, -16 %V4i32 = sdiv <4 x i32> undef, %V8i32 = sdiv <8 x i32> undef, %V16i32 = sdiv <16 x i32> undef, %I16 = sdiv i16 undef, -16 %V8i16 = sdiv <8 x i16> undef, %V16i16 = sdiv <16 x i16> undef, %V32i16 = sdiv <32 x i16> undef, %I8 = sdiv i8 undef, -16 %V16i8 = sdiv <16 x i8> undef, %V32i8 = sdiv <32 x i8> undef, %V64i8 = sdiv <64 x i8> undef, ret i32 undef } define i32 @udiv_constnegpow2() { ; CHECK-LABEL: 'udiv_constnegpow2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = udiv i64 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = udiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = udiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = udiv i32 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = udiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = udiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = udiv i16 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = udiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = udiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = udiv i8 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = udiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = udiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = udiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = udiv i64 undef, -16 %V2i64 = udiv <2 x i64> undef, %V4i64 = udiv <4 x i64> undef, %V8i64 = udiv <8 x i64> undef, %I32 = udiv i32 undef, -16 %V4i32 = udiv <4 x i32> undef, %V8i32 = udiv <8 x i32> undef, %V16i32 = udiv <16 x i32> undef, %I16 = udiv i16 undef, -16 %V8i16 = udiv <8 x i16> undef, %V16i16 = udiv <16 x i16> undef, %V32i16 = udiv <32 x i16> undef, %I8 = udiv i8 undef, -16 %V16i8 = udiv <16 x i8> undef, %V32i8 = udiv <32 x i8> undef, %V64i8 = udiv <64 x i8> undef, ret i32 undef } define i32 @sdiv_uniformconstnegpow2() { ; CHECK-LABEL: 'sdiv_uniformconstnegpow2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = sdiv i64 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = sdiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = sdiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = sdiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = sdiv i32 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = sdiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = sdiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = sdiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = sdiv i16 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = sdiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = sdiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = sdiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = sdiv i8 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = sdiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = sdiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = sdiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = sdiv i64 undef, -16 %V2i64 = sdiv <2 x i64> undef, %V4i64 = sdiv <4 x i64> undef, %V8i64 = sdiv <8 x i64> undef, %I32 = sdiv i32 undef, -16 %V4i32 = sdiv <4 x i32> undef, %V8i32 = sdiv <8 x i32> undef, %V16i32 = sdiv <16 x i32> undef, %I16 = sdiv i16 undef, -16 %V8i16 = sdiv <8 x i16> undef, %V16i16 = sdiv <16 x i16> undef, %V32i16 = sdiv <32 x i16> undef, %I8 = sdiv i8 undef, -16 %V16i8 = sdiv <16 x i8> undef, %V32i8 = sdiv <32 x i8> undef, %V64i8 = sdiv <64 x i8> undef, ret i32 undef } define i32 @udiv_uniformconstnegpow2() { ; CHECK-LABEL: 'udiv_uniformconstnegpow2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I64 = udiv i64 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V2i64 = udiv <2 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i64 = udiv <4 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i64 = udiv <8 x i64> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I32 = udiv i32 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4i32 = udiv <4 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i32 = udiv <8 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i32 = udiv <16 x i32> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I16 = udiv i16 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V8i16 = udiv <8 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i16 = udiv <16 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i16 = udiv <32 x i16> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %I8 = udiv i8 undef, -16 ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V16i8 = udiv <16 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V32i8 = udiv <32 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V64i8 = udiv <64 x i8> undef, ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef ; %I64 = udiv i64 undef, -16 %V2i64 = udiv <2 x i64> undef, %V4i64 = udiv <4 x i64> undef, %V8i64 = udiv <8 x i64> undef, %I32 = udiv i32 undef, -16 %V4i32 = udiv <4 x i32> undef, %V8i32 = udiv <8 x i32> undef, %V16i32 = udiv <16 x i32> undef, %I16 = udiv i16 undef, -16 %V8i16 = udiv <8 x i16> undef, %V16i16 = udiv <16 x i16> undef, %V32i16 = udiv <32 x i16> undef, %I8 = udiv i8 undef, -16 %V16i8 = udiv <16 x i8> undef, %V32i8 = udiv <32 x i8> undef, %V64i8 = udiv <64 x i8> undef, ret i32 undef }