[llvm] d654934 - [CostModel][X86] Fix check prefixes on cttz cost kinds tests

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 13:28:31 PDT 2022


Author: Simon Pilgrim
Date: 2022-09-06T21:27:51+01:00
New Revision: d654934b07177e2c6e7fbde62c1d5668f5614bfc

URL: https://github.com/llvm/llvm-project/commit/d654934b07177e2c6e7fbde62c1d5668f5614bfc
DIFF: https://github.com/llvm/llvm-project/commit/d654934b07177e2c6e7fbde62c1d5668f5614bfc.diff

LOG: [CostModel][X86] Fix check prefixes on cttz cost kinds tests

Add missing SSE2 + BMI/NOBMI coverage

Added: 
    

Modified: 
    llvm/test/Analysis/CostModel/X86/cttz-codesize.ll
    llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/CostModel/X86/cttz-codesize.ll b/llvm/test/Analysis/CostModel/X86/cttz-codesize.ll
index 02a0e23288e21..e83dcae0d9399 100644
--- a/llvm/test/Analysis/CostModel/X86/cttz-codesize.ll
+++ b/llvm/test/Analysis/CostModel/X86/cttz-codesize.ll
@@ -1,6 +1,6 @@
 ; 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=-bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,SSE2,NOBMI
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,SSE2,BMI
+; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=-bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,NOBMI
+; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,BMI,SSE2
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+bmi,+sse4.2 | FileCheck %s -check-prefixes=CHECK,BMI,SSE42
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+bmi,+avx | FileCheck %s -check-prefixes=CHECK,BMI,AVX1
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+bmi,+avx2 | FileCheck %s -check-prefixes=CHECK,BMI,AVX2
@@ -127,6 +127,10 @@ define <2 x i64> @var_cttz_v2i64(<2 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v2i64'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v2i64'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
@@ -152,6 +156,10 @@ define <2 x i64> @var_cttz_v2i64u(<2 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v2i64u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v2i64u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
@@ -177,6 +185,10 @@ define <4 x i64> @var_cttz_v4i64(<4 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i64'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i64'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
@@ -202,6 +214,10 @@ define <4 x i64> @var_cttz_v4i64u(<4 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i64u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i64u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
@@ -227,6 +243,10 @@ define <8 x i64> @var_cttz_v8i64(<8 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i64'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i64'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
@@ -252,6 +272,10 @@ define <8 x i64> @var_cttz_v8i64u(<8 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i64u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i64u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
@@ -277,6 +301,10 @@ define <4 x i32> @var_cttz_v4i32(<4 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i32'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i32'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
@@ -302,6 +330,10 @@ define <4 x i32> @var_cttz_v4i32u(<4 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i32u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i32u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
@@ -327,6 +359,10 @@ define <8 x i32> @var_cttz_v8i32(<8 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i32'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i32'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
@@ -352,6 +388,10 @@ define <8 x i32> @var_cttz_v8i32u(<8 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i32u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i32u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
@@ -377,6 +417,10 @@ define <16 x i32> @var_cttz_v16i32(<16 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 88 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v16i32'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 72 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v16i32'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
@@ -402,6 +446,10 @@ define <16 x i32> @var_cttz_v16i32u(<16 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 88 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v16i32u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 72 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v16i32u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
@@ -441,6 +489,10 @@ define <8 x i16> @var_cttz_v8i16u(<8 x i16> %a) {
 }
 
 define <16 x i16> @var_cttz_v16i16(<16 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i16'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i16'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
@@ -466,6 +518,10 @@ define <16 x i16> @var_cttz_v16i16(<16 x i16> %a) {
 }
 
 define <16 x i16> @var_cttz_v16i16u(<16 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i16u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i16u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
@@ -491,6 +547,10 @@ define <16 x i16> @var_cttz_v16i16u(<16 x i16> %a) {
 }
 
 define <32 x i16> @var_cttz_v32i16(<32 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i16'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i16'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
@@ -516,6 +576,10 @@ define <32 x i16> @var_cttz_v32i16(<32 x i16> %a) {
 }
 
 define <32 x i16> @var_cttz_v32i16u(<32 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i16u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i16u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
@@ -541,6 +605,10 @@ define <32 x i16> @var_cttz_v32i16u(<32 x i16> %a) {
 }
 
 define <16 x i8> @var_cttz_v16i8(<16 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i8'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i8'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
@@ -566,6 +634,10 @@ define <16 x i8> @var_cttz_v16i8(<16 x i8> %a) {
 }
 
 define <16 x i8> @var_cttz_v16i8u(<16 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i8u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i8u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
@@ -591,6 +663,10 @@ define <16 x i8> @var_cttz_v16i8u(<16 x i8> %a) {
 }
 
 define <32 x i8> @var_cttz_v32i8(<32 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i8'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i8'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
@@ -616,6 +692,10 @@ define <32 x i8> @var_cttz_v32i8(<32 x i8> %a) {
 }
 
 define <32 x i8> @var_cttz_v32i8u(<32 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i8u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i8u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
@@ -641,6 +721,10 @@ define <32 x i8> @var_cttz_v32i8u(<32 x i8> %a) {
 }
 
 define <64 x i8> @var_cttz_v64i8(<64 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v64i8'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v64i8'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz
@@ -666,6 +750,10 @@ define <64 x i8> @var_cttz_v64i8(<64 x i8> %a) {
 }
 
 define <64 x i8> @var_cttz_v64i8u(<64 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v64i8u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v64i8u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz

diff  --git a/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll b/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll
index 1dae024782825..160bd45f53d08 100644
--- a/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll
+++ b/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll
@@ -1,6 +1,6 @@
 ; 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=size-latency -mattr=-bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,SSE2,NOBMI
-; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,SSE2,BMI
+; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=-bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,NOBMI
+; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+bmi,+sse2 | FileCheck %s -check-prefixes=CHECK,BMI,SSE2
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+bmi,+sse4.2 | FileCheck %s -check-prefixes=CHECK,BMI,SSE42
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+bmi,+avx | FileCheck %s -check-prefixes=CHECK,BMI,AVX1
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+bmi,+avx2 | FileCheck %s -check-prefixes=CHECK,BMI,AVX2
@@ -127,6 +127,10 @@ define <2 x i64> @var_cttz_v2i64(<2 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v2i64'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v2i64'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
@@ -152,6 +156,10 @@ define <2 x i64> @var_cttz_v2i64u(<2 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v2i64u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v2i64u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %cttz
@@ -177,6 +185,10 @@ define <4 x i64> @var_cttz_v4i64(<4 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i64'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i64'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
@@ -202,6 +214,10 @@ define <4 x i64> @var_cttz_v4i64u(<4 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i64u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i64u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %cttz
@@ -227,6 +243,10 @@ define <8 x i64> @var_cttz_v8i64(<8 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i64'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i64'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
@@ -252,6 +272,10 @@ define <8 x i64> @var_cttz_v8i64u(<8 x i64> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i64u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i64u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %cttz
@@ -277,6 +301,10 @@ define <4 x i32> @var_cttz_v4i32(<4 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i32'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i32'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
@@ -302,6 +330,10 @@ define <4 x i32> @var_cttz_v4i32u(<4 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v4i32u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v4i32u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %cttz
@@ -327,6 +359,10 @@ define <8 x i32> @var_cttz_v8i32(<8 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i32'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i32'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
@@ -352,6 +388,10 @@ define <8 x i32> @var_cttz_v8i32u(<8 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v8i32u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v8i32u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %cttz
@@ -377,6 +417,10 @@ define <16 x i32> @var_cttz_v16i32(<16 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 88 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v16i32'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 72 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v16i32'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
@@ -402,6 +446,10 @@ define <16 x i32> @var_cttz_v16i32u(<16 x i32> %a) {
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 88 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
 ; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
 ;
+; SSE2-LABEL: 'var_cttz_v16i32u'
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 72 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
+; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
+;
 ; SSE42-LABEL: 'var_cttz_v16i32u'
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
 ; SSE42-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %cttz
@@ -441,6 +489,10 @@ define <8 x i16> @var_cttz_v8i16u(<8 x i16> %a) {
 }
 
 define <16 x i16> @var_cttz_v16i16(<16 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i16'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i16'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
@@ -466,6 +518,10 @@ define <16 x i16> @var_cttz_v16i16(<16 x i16> %a) {
 }
 
 define <16 x i16> @var_cttz_v16i16u(<16 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i16u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i16u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %cttz
@@ -491,6 +547,10 @@ define <16 x i16> @var_cttz_v16i16u(<16 x i16> %a) {
 }
 
 define <32 x i16> @var_cttz_v32i16(<32 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i16'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i16'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
@@ -516,6 +576,10 @@ define <32 x i16> @var_cttz_v32i16(<32 x i16> %a) {
 }
 
 define <32 x i16> @var_cttz_v32i16u(<32 x i16> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i16u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i16u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 96 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %cttz
@@ -541,6 +605,10 @@ define <32 x i16> @var_cttz_v32i16u(<32 x i16> %a) {
 }
 
 define <16 x i8> @var_cttz_v16i8(<16 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i8'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i8'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
@@ -566,6 +634,10 @@ define <16 x i8> @var_cttz_v16i8(<16 x i8> %a) {
 }
 
 define <16 x i8> @var_cttz_v16i8u(<16 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v16i8u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v16i8u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 78 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %cttz
@@ -591,6 +663,10 @@ define <16 x i8> @var_cttz_v16i8u(<16 x i8> %a) {
 }
 
 define <32 x i8> @var_cttz_v32i8(<32 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i8'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i8'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
@@ -616,6 +692,10 @@ define <32 x i8> @var_cttz_v32i8(<32 x i8> %a) {
 }
 
 define <32 x i8> @var_cttz_v32i8u(<32 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v32i8u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v32i8u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 156 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %cttz
@@ -641,6 +721,10 @@ define <32 x i8> @var_cttz_v32i8u(<32 x i8> %a) {
 }
 
 define <64 x i8> @var_cttz_v64i8(<64 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v64i8'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v64i8'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz
@@ -666,6 +750,10 @@ define <64 x i8> @var_cttz_v64i8(<64 x i8> %a) {
 }
 
 define <64 x i8> @var_cttz_v64i8u(<64 x i8> %a) {
+; NOBMI-LABEL: 'var_cttz_v64i8u'
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
+; NOBMI-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz
+;
 ; SSE2-LABEL: 'var_cttz_v64i8u'
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 312 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
 ; SSE2-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %cttz


        


More information about the llvm-commits mailing list