[llvm] r316829 - [X86] Add avx command lines to fast-isel-constpool.ll to improve coverage.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 23:31:48 PDT 2017


Author: ctopper
Date: Fri Oct 27 23:31:48 2017
New Revision: 316829

URL: http://llvm.org/viewvc/llvm-project?rev=316829&view=rev
Log:
[X86] Add avx command lines to fast-isel-constpool.ll to improve coverage.

Modified:
    llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll

Modified: llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll?rev=316829&r1=316828&r2=316829&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-constpool.ll Fri Oct 27 23:31:48 2017
@@ -1,6 +1,8 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small < %s | FileCheck %s
 ; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large < %s | FileCheck %s --check-prefix=LARGE
+; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=small -mattr=avx < %s | FileCheck %s --check-prefix=AVX
+; RUN: llc -mtriple=x86_64-apple-darwin -fast-isel -code-model=large -mattr=avx < %s | FileCheck %s --check-prefix=LARGE_AVX
 
 ; Make sure fast isel uses rip-relative addressing for the small code model.
 define float @constpool_float(float %x) {
@@ -15,6 +17,18 @@ define float @constpool_float(float %x)
 ; LARGE-NEXT:    movabsq $LCPI0_0, %rax
 ; LARGE-NEXT:    addss (%rax), %xmm0
 ; LARGE-NEXT:    retq
+;
+; AVX-LABEL: constpool_float:
+; AVX:       ## BB#0:
+; AVX-NEXT:    vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
+; AVX-NEXT:    vaddss %xmm1, %xmm0, %xmm0
+; AVX-NEXT:    retq
+;
+; LARGE_AVX-LABEL: constpool_float:
+; LARGE_AVX:       ## BB#0:
+; LARGE_AVX-NEXT:    movabsq $LCPI0_0, %rax
+; LARGE_AVX-NEXT:    vaddss (%rax), %xmm0, %xmm0
+; LARGE_AVX-NEXT:    retq
 
   %1 = fadd float %x, 16.50e+01
   ret float %1
@@ -32,6 +46,18 @@ define double @constpool_double(double %
 ; LARGE-NEXT:    movabsq $LCPI1_0, %rax
 ; LARGE-NEXT:    addsd (%rax), %xmm0
 ; LARGE-NEXT:    retq
+;
+; AVX-LABEL: constpool_double:
+; AVX:       ## BB#0:
+; AVX-NEXT:    vmovsd {{.*#+}} xmm1 = mem[0],zero
+; AVX-NEXT:    vaddsd %xmm1, %xmm0, %xmm0
+; AVX-NEXT:    retq
+;
+; LARGE_AVX-LABEL: constpool_double:
+; LARGE_AVX:       ## BB#0:
+; LARGE_AVX-NEXT:    movabsq $LCPI1_0, %rax
+; LARGE_AVX-NEXT:    vaddsd (%rax), %xmm0, %xmm0
+; LARGE_AVX-NEXT:    retq
 
   %1 = fadd double %x, 8.500000e-01
   ret double %1




More information about the llvm-commits mailing list