<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Currently this is purely used to test the XOP code path, but
      given the existing cpu tests I thought it'd be interesting, I can
      replace it with an +attr test if you prefer?</p>
    <p>At some point we'll start splicing these cost tables to use the
      scheduler models. <span data-sigil="slippery"><span
          class="phui-oi-objname">D46276 is a WIP patch that
          demonstrates how to do just that, but its some way off yet
          (still seeing issues with ugly code bloat, accuracy and
          usefulness etc.) - and ideally it'd allow us to get
          throughput, latency and code size costs.</span> </span></p>
    <div class="moz-cite-prefix">On 12/11/2018 17:07, Roman Lebedev
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CADoyv_5apfvVeBDQksAtQZsLf2exi9BeytF1+2deueJyD1Tx0A@mail.gmail.com">
      <pre wrap="">On Mon, Nov 12, 2018 at 7:42 PM Simon Pilgrim via llvm-commits
<a class="moz-txt-link-rfc2396E" href="mailto:llvm-commits@lists.llvm.org"><llvm-commits@lists.llvm.org></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">
Author: rksimon
Date: Mon Nov 12 08:39:41 2018
New Revision: 346670

URL: <a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project?rev=346670&view=rev">http://llvm.org/viewvc/llvm-project?rev=346670&view=rev</a>
Log:
[CostModel][X86] Add some initial cost tests for funnel shifts

Still need to add full uniform/constant coverage but this is enough to check basic fshl/fshr cost handling

Added:
    llvm/trunk/test/Analysis/CostModel/X86/fshl.ll
    llvm/trunk/test/Analysis/CostModel/X86/fshr.ll

Added: llvm/trunk/test/Analysis/CostModel/X86/fshl.ll
URL: <a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/fshl.ll?rev=346670&view=auto">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/fshl.ll?rev=346670&view=auto</a>
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/fshl.ll (added)
+++ llvm/trunk/test/Analysis/CostModel/X86/fshl.ll Mon Nov 12 08:39:41 2018
@@ -0,0 +1,390 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+ssse3 | FileCheck %s --check-prefixes=CHECK,SSE,SSSE3
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+sse4.2 | FileCheck %s --check-prefixes=CHECK,SSE,SSE42
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512BW
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512DQ
+;
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=slm | FileCheck %s --check-prefixes=SLM
+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=goldmont | FileCheck %s --check-prefixes=GLM
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">+; RUN: opt < %s -cost-model -analyze -mtriple=x86_64-apple-macosx10.8.0 -mcpu=bdver2 | FileCheck %s --check-prefixes=BDVER2
</pre>
      </blockquote>
      <pre wrap="">Note that i intentionally *not* added bdver2 into existing costmodel tests.
I wasn't sure it gives any additional test coverage, especially since
bdver2 is not marked as CompleteModel,
(FIXME: when i do, nothing seems to break. is the check for sched
model completeness just bad?),
and D46276 is not there yet.

Should bdver2 be checked in test/Analysis/CostModel/X86/* ?

Roman.
</pre>
    </blockquote>
  </body>
</html>