[llvm] r329499 - [CostModel][X86] Regenerate silvermont (and added goldmont) cost tests with update_analyze_test_checks.py

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 7 07:02:15 PDT 2018


Author: rksimon
Date: Sat Apr  7 07:02:14 2018
New Revision: 329499

URL: http://llvm.org/viewvc/llvm-project?rev=329499&view=rev
Log:
[CostModel][X86] Regenerate silvermont (and added goldmont) cost tests with update_analyze_test_checks.py

Modified:
    llvm/trunk/test/Analysis/CostModel/X86/slm-arith-costs.ll

Modified: llvm/trunk/test/Analysis/CostModel/X86/slm-arith-costs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/slm-arith-costs.ll?rev=329499&r1=329498&r2=329499&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/slm-arith-costs.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/slm-arith-costs.ll Sat Apr  7 07:02:14 2018
@@ -1,330 +1,641 @@
-; RUN: opt < %s -cost-model -analyze -mcpu=slm | FileCheck %s --check-prefix=SLM
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
+; RUN: opt < %s -cost-model -analyze -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SLM
+; RUN: opt < %s -cost-model -analyze -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,GLM
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define <2 x i64> @slm-costs_64_vector_add(<2 x i64> %a, <2 x i64> %b) {
+; SLM-LABEL: 'slm-costs_64_vector_add'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res = add <2 x i64> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %res
+;
+; GLM-LABEL: 'slm-costs_64_vector_add'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = add <2 x i64> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %res
+;
 entry:
-; SLM:  cost of 4 {{.*}} add <2 x i64>
   %res = add <2 x i64> %a, %b
   ret <2 x i64> %res
 }
 
 define <2 x i64> @slm-costs_64_vector_sub(<2 x i64> %a, <2 x i64> %b) {
+; SLM-LABEL: 'slm-costs_64_vector_sub'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res = sub <2 x i64> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %res
+;
+; GLM-LABEL: 'slm-costs_64_vector_sub'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = sub <2 x i64> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %res
+;
 entry:
-; SLM:  cost of 4 {{.*}} sub <2 x i64>
   %res = sub <2 x i64> %a, %b
   ret <2 x i64> %res
 }
 
 ; 8bit mul
 define i8 @slm-costs_8_scalar_mul(i8 %a, i8 %b)  {
+; CHECK-LABEL: 'slm-costs_8_scalar_mul'
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = mul nsw i8 %a, %b
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i8 %res
+;
 entry:
-; SLM:  cost of 1 {{.*}} mul nsw i8
   %res = mul nsw i8 %a, %b
   ret i8 %res
 }
 
 define <2 x i8> @slm-costs_8_v2_mul(<2 x i8> %a, <2 x i8> %b)  {
+; SLM-LABEL: 'slm-costs_8_v2_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res = mul nsw <2 x i8> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i8> %res
+;
+; GLM-LABEL: 'slm-costs_8_v2_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res = mul nsw <2 x i8> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i8> %res
+;
 entry:
-; SLM:  cost of 17 {{.*}} mul nsw <2 x i8>
   %res = mul nsw <2 x i8> %a, %b
   ret <2 x i8> %res
 }
 
 define <4 x i8> @slm-costs_8_v4_mul(<4 x i8> %a, <4 x i8> %b)  {
+; SLM-LABEL: 'slm-costs_8_v4_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res = mul nsw <4 x i8> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %res
+;
+; GLM-LABEL: 'slm-costs_8_v4_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i8> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i8> %res
+;
 entry:
-; SLM:  cost of 3 {{.*}} mul nsw <4 x i8>
   %res = mul nsw <4 x i8> %a, %b
   ret <4 x i8> %res
 }
 
 define <4 x i32> @slm-costs_8_v4_zext_mul(<4 x i8> %a)  {
+; SLM-LABEL: 'slm-costs_8_v4_zext_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i8> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res = mul nsw <4 x i32> %zext, <i32 255, i32 255, i32 255, i32 255>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_8_v4_zext_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i8> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %zext, <i32 255, i32 255, i32 255, i32 255>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 3 {{.*}} mul nsw <4 x i32>
-  %zext = zext <4 x i8> %a to <4 x i32> 
+  %zext = zext <4 x i8> %a to <4 x i32>
   %res = mul nsw <4 x i32> %zext, <i32 255, i32 255, i32 255, i32 255>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_8_v4_zext_mul_fail(<4 x i8> %a)  {
+; SLM-LABEL: 'slm-costs_8_v4_zext_mul_fail'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i8> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res = mul nsw <4 x i32> %zext, <i32 255, i32 255, i32 -1, i32 255>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_8_v4_zext_mul_fail'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i8> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %zext, <i32 255, i32 255, i32 -1, i32 255>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 5 {{.*}} mul nsw <4 x i32>
   %zext = zext <4 x i8> %a to <4 x i32>
   %res = mul nsw <4 x i32> %zext, <i32 255, i32 255, i32 -1, i32 255>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_8_v4_zext_mul_fail_2(<4 x i8> %a)  {
+; SLM-LABEL: 'slm-costs_8_v4_zext_mul_fail_2'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i8> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res = mul nsw <4 x i32> %zext, <i32 255, i32 256, i32 255, i32 255>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_8_v4_zext_mul_fail_2'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i8> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %zext, <i32 255, i32 256, i32 255, i32 255>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 5 {{.*}} mul nsw <4 x i32>
   %zext = zext <4 x i8> %a to <4 x i32>
   %res = mul nsw <4 x i32> %zext, <i32 255, i32 256, i32 255, i32 255>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_8_v4_sext_mul(<4 x i8> %a)  {
+; SLM-LABEL: 'slm-costs_8_v4_sext_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i8> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %res = mul nsw <4 x i32> %sext, <i32 127, i32 -128, i32 127, i32 -128>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_8_v4_sext_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i8> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %sext, <i32 127, i32 -128, i32 127, i32 -128>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 3 {{.*}} mul nsw <4 x i32>
   %sext = sext <4 x i8> %a to <4 x i32>
   %res = mul nsw <4 x i32> %sext, <i32 127, i32 -128, i32 127, i32 -128>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_8_v4_sext_mul_fail(<4 x i8> %a)  {
+; SLM-LABEL: 'slm-costs_8_v4_sext_mul_fail'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i8> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res = mul nsw <4 x i32> %sext, <i32 127, i32 -128, i32 128, i32 -128>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_8_v4_sext_mul_fail'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i8> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %sext, <i32 127, i32 -128, i32 128, i32 -128>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 5 {{.*}} mul nsw <4 x i32>
   %sext = sext <4 x i8> %a to <4 x i32>
   %res = mul nsw <4 x i32> %sext, <i32 127, i32 -128, i32 128, i32 -128>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_8_v4_sext_mul_fail_2(<4 x i8> %a)  {
+; SLM-LABEL: 'slm-costs_8_v4_sext_mul_fail_2'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i8> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res = mul nsw <4 x i32> %sext, <i32 127, i32 -129, i32 127, i32 -128>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_8_v4_sext_mul_fail_2'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i8> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %sext, <i32 127, i32 -129, i32 127, i32 -128>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 5 {{.*}} mul nsw <4 x i32>
   %sext = sext <4 x i8> %a to <4 x i32>
   %res = mul nsw <4 x i32> %sext, <i32 127, i32 -129, i32 127, i32 -128>
   ret <4 x i32> %res
 }
 
 define <8 x i8> @slm-costs_8_v8_mul(<8 x i8> %a, <8 x i8> %b)  {
+; SLM-LABEL: 'slm-costs_8_v8_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <8 x i8> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res
+;
+; GLM-LABEL: 'slm-costs_8_v8_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = mul nsw <8 x i8> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i8> %res
+;
 entry:
-; SLM:  cost of 2 {{.*}} mul nsw <8 x i8>
   %res = mul nsw <8 x i8> %a, %b
   ret <8 x i8> %res
 }
 
 define <16 x i8> @slm-costs_8_v16_mul(<16 x i8> %a, <16 x i8> %b)  {
+; SLM-LABEL: 'slm-costs_8_v16_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 14 for instruction: %res = mul nsw <16 x i8> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %res
+;
+; GLM-LABEL: 'slm-costs_8_v16_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 12 for instruction: %res = mul nsw <16 x i8> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %res
+;
 entry:
-; SLM:  cost of 14 {{.*}} mul nsw <16 x i8>
   %res = mul nsw <16 x i8> %a, %b
   ret <16 x i8> %res
 }
 
 ; 16bit mul
 define i16 @slm-costs_16_scalar_mul(i16 %a, i16 %b)  {
+; CHECK-LABEL: 'slm-costs_16_scalar_mul'
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = mul nsw i16 %a, %b
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i16 %res
+;
 entry:
-; SLM:  cost of 1 {{.*}} mul nsw i16
   %res = mul nsw i16 %a, %b
   ret i16 %res
 }
 
 define <2 x i16> @slm-costs_16_v2_mul(<2 x i16> %a, <2 x i16> %b)  {
+; SLM-LABEL: 'slm-costs_16_v2_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res = mul nsw <2 x i16> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i16> %res
+;
+; GLM-LABEL: 'slm-costs_16_v2_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res = mul nsw <2 x i16> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i16> %res
+;
 entry:
-; SLM:  cost of 17 {{.*}} mul nsw <2 x i16>
   %res = mul nsw <2 x i16> %a, %b
   ret <2 x i16> %res
 }
 
 define <4 x i16> @slm-costs_16_v4_mul(<4 x i16> %a, <4 x i16> %b)  {
+; SLM-LABEL: 'slm-costs_16_v4_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res = mul nsw <4 x i16> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %res
+;
+; GLM-LABEL: 'slm-costs_16_v4_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i16> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i16> %res
+;
 entry:
-; SLM:  cost of 5 {{.*}} mul nsw <4 x i16>
   %res = mul nsw <4 x i16> %a, %b
   ret <4 x i16> %res
 }
 
 define <4 x i32> @slm-costs_16_v4_zext_mul(<4 x i16> %a)  {
+; SLM-LABEL: 'slm-costs_16_v4_zext_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i16> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res = mul nsw <4 x i32> %zext, <i32 65535, i32 65535, i32 65535, i32 65535>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_16_v4_zext_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i16> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %zext, <i32 65535, i32 65535, i32 65535, i32 65535>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 5 {{.*}} mul nsw <4 x i32>
   %zext = zext <4 x i16> %a to <4 x i32>
   %res = mul nsw <4 x i32> %zext, <i32 65535, i32 65535, i32 65535, i32 65535>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_16_v4_zext_mul_fail(<4 x i16> %a)  {
+; SLM-LABEL: 'slm-costs_16_v4_zext_mul_fail'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i16> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %res = mul nsw <4 x i32> %zext, <i32 -1, i32 65535, i32 65535, i32 65535>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_16_v4_zext_mul_fail'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i16> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %zext, <i32 -1, i32 65535, i32 65535, i32 65535>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 11 {{.*}} mul nsw <4 x i32>
   %zext = zext <4 x i16> %a to <4 x i32>
   %res = mul nsw <4 x i32> %zext, <i32 -1, i32 65535, i32 65535, i32 65535>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_16_v4_zext_mul_fail_2(<4 x i16> %a)  {
+; SLM-LABEL: 'slm-costs_16_v4_zext_mul_fail_2'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i16> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %res = mul nsw <4 x i32> %zext, <i32 65536, i32 65535, i32 65535, i32 65535>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_16_v4_zext_mul_fail_2'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %zext = zext <4 x i16> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %zext, <i32 65536, i32 65535, i32 65535, i32 65535>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 11 {{.*}} mul nsw <4 x i32>
   %zext = zext <4 x i16> %a to <4 x i32>
   %res = mul nsw <4 x i32> %zext, <i32 65536, i32 65535, i32 65535, i32 65535>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_16_v4_sext_mul(<4 x i16> %a)  {
+; SLM-LABEL: 'slm-costs_16_v4_sext_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i16> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32767, i32 -32768>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_16_v4_sext_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i16> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32767, i32 -32768>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 5 {{.*}} mul nsw <4 x i32>
   %sext = sext <4 x i16> %a to <4 x i32>
   %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32767, i32 -32768>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_16_v4_sext_mul_fail(<4 x i16> %a)  {
+; SLM-LABEL: 'slm-costs_16_v4_sext_mul_fail'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i16> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32768, i32 -32768>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_16_v4_sext_mul_fail'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i16> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32768, i32 -32768>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 11 {{.*}} mul nsw <4 x i32>
   %sext = sext <4 x i16> %a to <4 x i32>
   %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32768, i32 -32768>
   ret <4 x i32> %res
 }
 
 define <4 x i32> @slm-costs_16_v4_sext_mul_fail_2(<4 x i16> %a)  {
+; SLM-LABEL: 'slm-costs_16_v4_sext_mul_fail_2'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i16> %a to <4 x i32>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32767, i32 -32769>
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_16_v4_sext_mul_fail_2'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %sext = sext <4 x i16> %a to <4 x i32>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32767, i32 -32769>
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 11 {{.*}} mul nsw <4 x i32>
   %sext = sext <4 x i16> %a to <4 x i32>
   %res = mul nsw <4 x i32> %sext, <i32 32767, i32 -32768, i32 32767, i32 -32769>
   ret <4 x i32> %res
 }
 
 define <8 x i16> @slm-costs_16_v8_mul(<8 x i16> %a, <8 x i16> %b)  {
+; SLM-LABEL: 'slm-costs_16_v8_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <8 x i16> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %res
+;
+; GLM-LABEL: 'slm-costs_16_v8_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = mul nsw <8 x i16> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %res
+;
 entry:
-; SLM:  cost of 2 {{.*}} mul nsw <8 x i16>
   %res = mul nsw <8 x i16> %a, %b
   ret <8 x i16> %res
 }
 
 define <16 x i16> @slm-costs_16_v16_mul(<16 x i16> %a, <16 x i16> %b)  {
+; SLM-LABEL: 'slm-costs_16_v16_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res = mul nsw <16 x i16> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %res
+;
+; GLM-LABEL: 'slm-costs_16_v16_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <16 x i16> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %res
+;
 entry:
-; SLM:  cost of 4 {{.*}} mul nsw <16 x i16>
   %res = mul nsw <16 x i16> %a, %b
   ret <16 x i16> %res
 }
 
 ; 32bit mul
 define i32 @slm-costs_32_scalar_mul(i32 %a, i32 %b)  {
+; CHECK-LABEL: 'slm-costs_32_scalar_mul'
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = mul nsw i32 %a, %b
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %res
+;
 entry:
-; SLM:  cost of 1 {{.*}} mul nsw i32
   %res = mul nsw i32 %a, %b
-  ret i32 %res 
+  ret i32 %res
 }
 
 define <2 x i32> @slm-costs_32_v2_mul(<2 x i32> %a, <2 x i32> %b)  {
+; SLM-LABEL: 'slm-costs_32_v2_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res = mul nsw <2 x i32> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_32_v2_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res = mul nsw <2 x i32> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i32> %res
+;
 entry:
-; SLM:  cost of 17 {{.*}} mul nsw <2 x i32>
   %res = mul nsw <2 x i32> %a, %b
   ret <2 x i32> %res
 }
 
 define <4 x i32> @slm-costs_32_v4_mul(<4 x i32> %a, <4 x i32> %b)  {
+; SLM-LABEL: 'slm-costs_32_v4_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %res = mul nsw <4 x i32> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_32_v4_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = mul nsw <4 x i32> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %res
+;
 entry:
-; SLM:  cost of 11 {{.*}} mul nsw <4 x i32>
   %res = mul nsw <4 x i32> %a, %b
   ret <4 x i32> %res
 }
 
 define <8 x i32> @slm-costs_32_v8_mul(<8 x i32> %a, <8 x i32> %b)  {
+; SLM-LABEL: 'slm-costs_32_v8_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 22 for instruction: %res = mul nsw <8 x i32> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_32_v8_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res = mul nsw <8 x i32> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %res
+;
 entry:
-; SLM:  cost of 22 {{.*}} mul nsw <8 x i32>
   %res = mul nsw <8 x i32> %a, %b
   ret <8 x i32> %res
 }
 
 define <16 x i32> @slm-costs_32_v16_mul(<16 x i32> %a, <16 x i32> %b)  {
+; SLM-LABEL: 'slm-costs_32_v16_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 44 for instruction: %res = mul nsw <16 x i32> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %res
+;
+; GLM-LABEL: 'slm-costs_32_v16_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res = mul nsw <16 x i32> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %res
+;
 entry:
-; SLM:  cost of 44 {{.*}} mul nsw <16 x i32>
   %res = mul nsw <16 x i32> %a, %b
   ret <16 x i32> %res
 }
 
 ; 64bit mul
 define i64 @slm-costs_64_scalar_mul(i64 %a, i64 %b)  {
+; CHECK-LABEL: 'slm-costs_64_scalar_mul'
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = mul nsw i64 %a, %b
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i64 %res
+;
 entry:
-; SLM:  cost of 1 {{.*}} mul nsw i64
   %res = mul nsw i64 %a, %b
   ret i64 %res
 }
 
 define <2 x i64> @slm-costs_64_v2_mul(<2 x i64> %a, <2 x i64> %b)  {
+; SLM-LABEL: 'slm-costs_64_v2_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res = mul nsw <2 x i64> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %res
+;
+; GLM-LABEL: 'slm-costs_64_v2_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 8 for instruction: %res = mul nsw <2 x i64> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %res
+;
 entry:
-; SLM:  cost of 17 {{.*}} mul nsw <2 x i64>
   %res = mul nsw <2 x i64> %a, %b
   ret <2 x i64> %res
 }
 
 define <4 x i64> @slm-costs_64_v4_mul(<4 x i64> %a, <4 x i64> %b)  {
+; SLM-LABEL: 'slm-costs_64_v4_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 34 for instruction: %res = mul nsw <4 x i64> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %res
+;
+; GLM-LABEL: 'slm-costs_64_v4_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %res = mul nsw <4 x i64> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %res
+;
 entry:
-; SLM:  cost of 34 {{.*}} mul nsw <4 x i64>
   %res = mul nsw <4 x i64> %a, %b
   ret <4 x i64> %res
 }
 
 define <8 x i64> @slm-costs_64_v8_mul(<8 x i64> %a, <8 x i64> %b)  {
+; SLM-LABEL: 'slm-costs_64_v8_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 68 for instruction: %res = mul nsw <8 x i64> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %res
+;
+; GLM-LABEL: 'slm-costs_64_v8_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res = mul nsw <8 x i64> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %res
+;
 entry:
-; SLM:  cost of 68 {{.*}} mul nsw <8 x i64>
   %res = mul nsw <8 x i64> %a, %b
   ret <8 x i64> %res
 }
 
 define <16 x i64> @slm-costs_64_v16_mul(<16 x i64> %a, <16 x i64> %b)  {
+; SLM-LABEL: 'slm-costs_64_v16_mul'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 136 for instruction: %res = mul nsw <16 x i64> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i64> %res
+;
+; GLM-LABEL: 'slm-costs_64_v16_mul'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 64 for instruction: %res = mul nsw <16 x i64> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i64> %res
+;
 entry:
-; SLM:  cost of 136 {{.*}} mul nsw <16 x i64>
   %res = mul nsw <16 x i64> %a, %b
   ret <16 x i64> %res
 }
 
 ; mulsd
 define double @slm-costs_mulsd(double %a, double %b)  {
+; SLM-LABEL: 'slm-costs_mulsd'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = fmul double %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %res
+;
+; GLM-LABEL: 'slm-costs_mulsd'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = fmul double %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %res
+;
 entry:
-; SLM:  cost of 2 {{.*}} fmul double
   %res = fmul double %a, %b
   ret double %res
 }
 
 ; mulpd
 define <2 x double> @slm-costs_mulpd(<2 x double> %a, <2 x double> %b)  {
+; SLM-LABEL: 'slm-costs_mulpd'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %res = fmul <2 x double> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
+; GLM-LABEL: 'slm-costs_mulpd'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = fmul <2 x double> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
 entry:
-; SLM:  cost of 4 {{.*}} fmul <2 x double>
   %res = fmul <2 x double> %a, %b
   ret <2 x double> %res
 }
 
 ; mulps
 define <4 x float> @slm-costs_mulps(<4 x float> %a, <4 x float> %b)  {
+; SLM-LABEL: 'slm-costs_mulps'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = fmul <4 x float> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %res
+;
+; GLM-LABEL: 'slm-costs_mulps'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = fmul <4 x float> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %res
+;
 entry:
-; SLM:  cost of 2 {{.*}} fmul <4 x float>
   %res = fmul <4 x float> %a, %b
   ret <4 x float> %res
 }
 
 ; divss
 define float @slm-costs_divss(float %a, float %b)  {
+; SLM-LABEL: 'slm-costs_divss'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %res = fdiv float %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %res
+;
+; GLM-LABEL: 'slm-costs_divss'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 18 for instruction: %res = fdiv float %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret float %res
+;
 entry:
-; SLM:  cost of 17 {{.*}} fdiv float
   %res = fdiv float %a, %b
   ret float %res
 }
 
 ; divps
 define <4 x float> @slm-costs_divps(<4 x float> %a, <4 x float> %b)  {
+; SLM-LABEL: 'slm-costs_divps'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 39 for instruction: %res = fdiv <4 x float> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %res
+;
+; GLM-LABEL: 'slm-costs_divps'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 35 for instruction: %res = fdiv <4 x float> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <4 x float> %res
+;
 entry:
-; SLM:  cost of 39 {{.*}} fdiv <4 x float>
   %res = fdiv <4 x float> %a, %b
   ret <4 x float> %res
 }
 
 ; divsd
 define double @slm-costs_divsd(double %a, double %b)  {
+; SLM-LABEL: 'slm-costs_divsd'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 32 for instruction: %res = fdiv double %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %res
+;
+; GLM-LABEL: 'slm-costs_divsd'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %res = fdiv double %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret double %res
+;
 entry:
-; SLM:  cost of 32 {{.*}} fdiv double
   %res = fdiv double %a, %b
   ret double %res
 }
 
 ; divpd
 define <2 x double> @slm-costs_divpd(<2 x double> %a, <2 x double> %b)  {
+; SLM-LABEL: 'slm-costs_divpd'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 69 for instruction: %res = fdiv <2 x double> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
+; GLM-LABEL: 'slm-costs_divpd'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 65 for instruction: %res = fdiv <2 x double> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
 entry:
-; SLM:  cost of 69 {{.*}} fdiv <2 x double>
   %res = fdiv <2 x double> %a, %b
   ret <2 x double> %res
 }
 
 ; addpd
 define <2 x double> @slm-costs_addpd(<2 x double> %a, <2 x double> %b)  {
+; SLM-LABEL: 'slm-costs_addpd'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = fadd <2 x double> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
+; GLM-LABEL: 'slm-costs_addpd'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = fadd <2 x double> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
 entry:
-; SLM:  cost of 2 {{.*}} fadd <2 x double>
   %res = fadd <2 x double> %a, %b
   ret <2 x double> %res
 }
 
 ; subpd
 define <2 x double> @slm-costs_subpd(<2 x double> %a, <2 x double> %b)  {
+; SLM-LABEL: 'slm-costs_subpd'
+; SLM-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %res = fsub <2 x double> %a, %b
+; SLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
+; GLM-LABEL: 'slm-costs_subpd'
+; GLM-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %res = fsub <2 x double> %a, %b
+; GLM-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <2 x double> %res
+;
 entry:
-; SLM:  cost of 2 {{.*}} fsub <2 x double>
   %res = fsub <2 x double> %a, %b
   ret <2 x double> %res
 }




More information about the llvm-commits mailing list