[llvm] r328859 - [X86] Add tests to verify the presence of "ReadAfterLd" after r328823.
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 30 04:44:48 PDT 2018
Author: adibiagio
Date: Fri Mar 30 04:44:48 2018
New Revision: 328859
URL: http://llvm.org/viewvc/llvm-project?rev=328859&view=rev
Log:
[X86] Add tests to verify the presence of "ReadAfterLd" after r328823.
This change adds a couple of tests to verify the change introduced by revision
328823 ([X86] Correct the placement of ReadAfterLd in BEXTR and BZHI).
Added:
llvm/trunk/test/tools/llvm-mca/X86/bextr-read-after-ld.s
llvm/trunk/test/tools/llvm-mca/X86/bzhi-read-after-ld.s
Added: llvm/trunk/test/tools/llvm-mca/X86/bextr-read-after-ld.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/bextr-read-after-ld.s?rev=328859&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/bextr-read-after-ld.s (added)
+++ llvm/trunk/test/tools/llvm-mca/X86/bextr-read-after-ld.s Fri Mar 30 04:44:48 2018
@@ -0,0 +1,29 @@
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=HASWELL
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=BDWELL
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=SKYLAKE
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=BTVER2
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=ZNVER1
+
+add %edi, %esi
+bextrl %esi, (%rdi), %eax
+
+
+# HASWELL: Index 0123456789
+# HASWELL: [0,0] DeER . . addl %edi, %esi
+# HASWELL-NEXT: [0,1] DeeeeeeeER bextrl %esi, (%rdi), %eax
+
+# BDWELL: Index 0123456789
+# BDWELL: [0,0] DeER . . addl %edi, %esi
+# BDWELL-NEXT: [0,1] DeeeeeeeER bextrl %esi, (%rdi), %eax
+
+# SKYLAKE: Index 0123456789
+# SKYLAKE: [0,0] DeER . . addl %edi, %esi
+# SKYLAKE-NEXT: [0,1] DeeeeeeeER bextrl %esi, (%rdi), %eax
+
+# BTVER2: Index 0123456
+# BTVER2: [0,0] DeER .. addl %edi, %esi
+# BTVER2-NEXT: [0,1] DeeeeER bextrl %esi, (%rdi), %eax
+
+# ZNVER1: Index 01234567
+# ZNVER1: [0,0] DeER . . addl %edi, %esi
+# ZNVER1-NEXT: [0,1] DeeeeeER bextrl %esi, (%rdi), %eax
Added: llvm/trunk/test/tools/llvm-mca/X86/bzhi-read-after-ld.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/bzhi-read-after-ld.s?rev=328859&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/bzhi-read-after-ld.s (added)
+++ llvm/trunk/test/tools/llvm-mca/X86/bzhi-read-after-ld.s Fri Mar 30 04:44:48 2018
@@ -0,0 +1,24 @@
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=HASWELL
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=BDWELL
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=SKYLAKE
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=ZNVER1
+
+add %edi, %esi
+bzhil %esi, (%rdi), %eax
+
+
+# HASWELL: Index 012345678
+# HASWELL: [0,0] DeER . . addl %edi, %esi
+# HASWELL-NEXT: [0,1] DeeeeeeER bzhil %esi, (%rdi), %eax
+
+# BDWELL: Index 012345678
+# BDWELL: [0,0] DeER . . addl %edi, %esi
+# BDWELL-NEXT: [0,1] DeeeeeeER bzhil %esi, (%rdi), %eax
+
+# SKYLAKE: Index 012345678
+# SKYLAKE: [0,0] DeER . . addl %edi, %esi
+# SKYLAKE-NEXT: [0,1] DeeeeeeER bzhil %esi, (%rdi), %eax
+
+# ZNVER1: Index 01234567
+# ZNVER1: [0,0] DeER . . addl %edi, %esi
+# ZNVER1-NEXT: [0,1] DeeeeeER bzhil %esi, (%rdi), %eax
More information about the llvm-commits
mailing list