-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[CostModel][X86] merge vector shifts costs tests using -cost-kind=all #131806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-llvm-analysis Author: Simon Pilgrim (RKSimon) ChangesPatch is 2.73 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/131806.diff 15 Files Affected:
diff --git a/llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll b/llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll
deleted file mode 100644
index 195c61921219f..0000000000000
--- a/llvm/test/Analysis/CostModel/X86/vshift-ashr-codesize.ll
+++ /dev/null
@@ -1,1758 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+sse2 | FileCheck %s --check-prefixes=CHECK,SSE2
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+sse4.2 | FileCheck %s --check-prefixes=CHECK,SSE42
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+xop,+avx | FileCheck %s --check-prefixes=CHECK,XOP,XOPAVX1
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+xop,+avx2 | FileCheck %s --check-prefixes=CHECK,XOP,XOPAVX2
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512BW
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx512f,+avx512vl | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx512f,+avx512dq,+avx512vl | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512BW
-;
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mcpu=tigerlake | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512GFNI
-
-; Verify the cost of vector logical shift right instructions.
-
-;
-; Variable Shifts
-;
-
-define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) {
-; SSE2-LABEL: 'var_shift_v2i64'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <2 x i64> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
-;
-; SSE42-LABEL: 'var_shift_v2i64'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
-;
-; AVX1-LABEL: 'var_shift_v2i64'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <2 x i64> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
-;
-; AVX2-LABEL: 'var_shift_v2i64'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
-;
-; XOP-LABEL: 'var_shift_v2i64'
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
-;
-; AVX512-LABEL: 'var_shift_v2i64'
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %b
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
-;
- %shift = ashr <2 x i64> %a, %b
- ret <2 x i64> %shift
-}
-
-define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) {
-; SSE2-LABEL: 'var_shift_v4i64'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <4 x i64> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
-;
-; SSE42-LABEL: 'var_shift_v4i64'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <4 x i64> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
-;
-; AVX1-LABEL: 'var_shift_v4i64'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = ashr <4 x i64> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
-;
-; AVX2-LABEL: 'var_shift_v4i64'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <4 x i64> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
-;
-; XOP-LABEL: 'var_shift_v4i64'
-; XOP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <4 x i64> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
-;
-; AVX512-LABEL: 'var_shift_v4i64'
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, %b
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
-;
- %shift = ashr <4 x i64> %a, %b
- ret <4 x i64> %shift
-}
-
-define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) {
-; SSE2-LABEL: 'var_shift_v8i64'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %shift = ashr <8 x i64> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
-;
-; SSE42-LABEL: 'var_shift_v8i64'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = ashr <8 x i64> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
-;
-; AVX1-LABEL: 'var_shift_v8i64'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %shift = ashr <8 x i64> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
-;
-; AVX2-LABEL: 'var_shift_v8i64'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i64> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
-;
-; XOP-LABEL: 'var_shift_v8i64'
-; XOP-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i64> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
-;
-; AVX512-LABEL: 'var_shift_v8i64'
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, %b
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
-;
- %shift = ashr <8 x i64> %a, %b
- ret <8 x i64> %shift
-}
-
-define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) {
-; SSE2-LABEL: 'var_shift_v4i32'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <4 x i32> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
-;
-; SSE42-LABEL: 'var_shift_v4i32'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <4 x i32> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
-;
-; AVX1-LABEL: 'var_shift_v4i32'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <4 x i32> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
-;
-; AVX2-LABEL: 'var_shift_v4i32'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
-;
-; XOP-LABEL: 'var_shift_v4i32'
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
-;
-; AVX512-LABEL: 'var_shift_v4i32'
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, %b
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
-;
- %shift = ashr <4 x i32> %a, %b
- ret <4 x i32> %shift
-}
-
-define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) {
-; SSE2-LABEL: 'var_shift_v8i32'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <8 x i32> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
-;
-; SSE42-LABEL: 'var_shift_v8i32'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <8 x i32> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
-;
-; AVX1-LABEL: 'var_shift_v8i32'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <8 x i32> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
-;
-; AVX2-LABEL: 'var_shift_v8i32'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
-;
-; XOPAVX1-LABEL: 'var_shift_v8i32'
-; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <8 x i32> %a, %b
-; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
-;
-; XOPAVX2-LABEL: 'var_shift_v8i32'
-; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, %b
-; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
-;
-; AVX512-LABEL: 'var_shift_v8i32'
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, %b
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
-;
- %shift = ashr <8 x i32> %a, %b
- ret <8 x i32> %shift
-}
-
-define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) {
-; SSE2-LABEL: 'var_shift_v16i32'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %shift = ashr <16 x i32> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
-;
-; SSE42-LABEL: 'var_shift_v16i32'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %shift = ashr <16 x i32> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
-;
-; AVX1-LABEL: 'var_shift_v16i32'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %shift = ashr <16 x i32> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
-;
-; AVX2-LABEL: 'var_shift_v16i32'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i32> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
-;
-; XOPAVX1-LABEL: 'var_shift_v16i32'
-; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <16 x i32> %a, %b
-; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
-;
-; XOPAVX2-LABEL: 'var_shift_v16i32'
-; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i32> %a, %b
-; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
-;
-; AVX512-LABEL: 'var_shift_v16i32'
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, %b
-; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
-;
- %shift = ashr <16 x i32> %a, %b
- ret <16 x i32> %shift
-}
-
-define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) {
-; SSE2-LABEL: 'var_shift_v8i16'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %shift = ashr <8 x i16> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
-; SSE42-LABEL: 'var_shift_v8i16'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %shift = ashr <8 x i16> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
-; AVX1-LABEL: 'var_shift_v8i16'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <8 x i16> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
-; AVX2-LABEL: 'var_shift_v8i16'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <8 x i16> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
-; XOP-LABEL: 'var_shift_v8i16'
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
-; AVX512F-LABEL: 'var_shift_v8i16'
-; AVX512F-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <8 x i16> %a, %b
-; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
-; AVX512BW-LABEL: 'var_shift_v8i16'
-; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, %b
-; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
-; AVX512GFNI-LABEL: 'var_shift_v8i16'
-; AVX512GFNI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, %b
-; AVX512GFNI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
-;
- %shift = ashr <8 x i16> %a, %b
- ret <8 x i16> %shift
-}
-
-define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) {
-; SSE2-LABEL: 'var_shift_v16i16'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %shift = ashr <16 x i16> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
-; SSE42-LABEL: 'var_shift_v16i16'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 46 for instruction: %shift = ashr <16 x i16> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
-; AVX1-LABEL: 'var_shift_v16i16'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %shift = ashr <16 x i16> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
-; AVX2-LABEL: 'var_shift_v16i16'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <16 x i16> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
-; XOP-LABEL: 'var_shift_v16i16'
-; XOP-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i16> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
-; AVX512F-LABEL: 'var_shift_v16i16'
-; AVX512F-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <16 x i16> %a, %b
-; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
-; AVX512BW-LABEL: 'var_shift_v16i16'
-; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, %b
-; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
-; AVX512GFNI-LABEL: 'var_shift_v16i16'
-; AVX512GFNI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, %b
-; AVX512GFNI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
-;
- %shift = ashr <16 x i16> %a, %b
- ret <16 x i16> %shift
-}
-
-define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) {
-; SSE2-LABEL: 'var_shift_v32i16'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 124 for instruction: %shift = ashr <32 x i16> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
-; SSE42-LABEL: 'var_shift_v32i16'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 92 for instruction: %shift = ashr <32 x i16> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
-; AVX1-LABEL: 'var_shift_v32i16'
-; AVX1-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %shift = ashr <32 x i16> %a, %b
-; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
-; AVX2-LABEL: 'var_shift_v32i16'
-; AVX2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %shift = ashr <32 x i16> %a, %b
-; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
-; XOP-LABEL: 'var_shift_v32i16'
-; XOP-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i16> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
-; AVX512F-LABEL: 'var_shift_v32i16'
-; AVX512F-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %shift = ashr <32 x i16> %a, %b
-; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
-; AVX512BW-LABEL: 'var_shift_v32i16'
-; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, %b
-; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
-; AVX512GFNI-LABEL: 'var_shift_v32i16'
-; AVX512GFNI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, %b
-; AVX512GFNI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
-;
- %shift = ashr <32 x i16> %a, %b
- ret <32 x i16> %shift
-}
-
-define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) {
-; SSE2-LABEL: 'var_shift_v16i8'
-; SSE2-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %shift = ashr <16 x i8> %a, %b
-; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
-;
-; SSE42-LABEL: 'var_shift_v16i8'
-; SSE42-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <16 x i8> %a, %b
-; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
-;
-; AVX-LABEL: 'var_shift_v16i8'
-; AVX-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <16 x i8> %a, %b
-; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
-;
-; XOP-LABEL: 'var_shift_v16i8'
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i8> %a, %b
-; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
-;
-...
[truncated]
|
You can test this locally with the following command:git diff -U0 --pickaxe-regex -S '([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)' d85a81b4e4cfc0fdc7c259d64f847e7bbeee56d2 82383d7b684faa85112c555ba6fd4a601b96dd39 llvm/test/Analysis/CostModel/X86/vshift-ashr-cost-inseltpoison.ll llvm/test/Analysis/CostModel/X86/vshift-ashr-cost.ll llvm/test/Analysis/CostModel/X86/vshift-lshr-cost-inseltpoison.ll llvm/test/Analysis/CostModel/X86/vshift-lshr-cost.ll llvm/test/Analysis/CostModel/X86/vshift-shl-cost-inseltpoison.ll llvm/test/Analysis/CostModel/X86/vshift-shl-cost.ll The following files introduce new uses of undef:
Undef is now deprecated and should only be used in the rare cases where no replacement is possible. For example, a load of uninitialized memory yields In tests, avoid using For example, this is considered a bad practice: define void @fn() {
...
br i1 undef, ...
} Please use the following instead: define void @fn(i1 %cond) {
...
br i1 %cond, ...
} Please refer to the Undefined Behavior Manual for more information. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/17874 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/16611 Here is the relevant piece of the build log for the reference
|
No description provided.