Home | History | Annotate | Download | only in X86
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc < %s -mtriple=i386-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X32 --check-prefix=X32-SSE
      3 ; RUN: llc < %s -mtriple=i386-unknown -mattr=+avx  | FileCheck %s --check-prefix=X32 --check-prefix=X32-AVX
      4 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2 | FileCheck %s --check-prefix=X64 --check-prefix=X64-SSE
      5 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx  | FileCheck %s --check-prefix=X64 --check-prefix=X64-AVX
      6 
      7 define <16 x i8> @coo() nounwind {
      8 ; X32-SSE-LABEL: coo:
      9 ; X32-SSE:       # BB#0:
     10 ; X32-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     11 ; X32-SSE-NEXT:    retl
     12 ;
     13 ; X32-AVX-LABEL: coo:
     14 ; X32-AVX:       # BB#0:
     15 ; X32-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     16 ; X32-AVX-NEXT:    retl
     17 ;
     18 ; X64-SSE-LABEL: coo:
     19 ; X64-SSE:       # BB#0:
     20 ; X64-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     21 ; X64-SSE-NEXT:    retq
     22 ;
     23 ; X64-AVX-LABEL: coo:
     24 ; X64-AVX:       # BB#0:
     25 ; X64-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     26 ; X64-AVX-NEXT:    retq
     27   ret <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
     28 }
     29 
     30 define <8 x i16> @soo() nounwind {
     31 ; X32-SSE-LABEL: soo:
     32 ; X32-SSE:       # BB#0:
     33 ; X32-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     34 ; X32-SSE-NEXT:    retl
     35 ;
     36 ; X32-AVX-LABEL: soo:
     37 ; X32-AVX:       # BB#0:
     38 ; X32-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     39 ; X32-AVX-NEXT:    retl
     40 ;
     41 ; X64-SSE-LABEL: soo:
     42 ; X64-SSE:       # BB#0:
     43 ; X64-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     44 ; X64-SSE-NEXT:    retq
     45 ;
     46 ; X64-AVX-LABEL: soo:
     47 ; X64-AVX:       # BB#0:
     48 ; X64-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     49 ; X64-AVX-NEXT:    retq
     50   ret <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
     51 }
     52 
     53 define <4 x i32> @ioo() nounwind {
     54 ; X32-SSE-LABEL: ioo:
     55 ; X32-SSE:       # BB#0:
     56 ; X32-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     57 ; X32-SSE-NEXT:    retl
     58 ;
     59 ; X32-AVX-LABEL: ioo:
     60 ; X32-AVX:       # BB#0:
     61 ; X32-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     62 ; X32-AVX-NEXT:    retl
     63 ;
     64 ; X64-SSE-LABEL: ioo:
     65 ; X64-SSE:       # BB#0:
     66 ; X64-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     67 ; X64-SSE-NEXT:    retq
     68 ;
     69 ; X64-AVX-LABEL: ioo:
     70 ; X64-AVX:       # BB#0:
     71 ; X64-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     72 ; X64-AVX-NEXT:    retq
     73   ret <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
     74 }
     75 
     76 define <2 x i64> @loo() nounwind {
     77 ; X32-SSE-LABEL: loo:
     78 ; X32-SSE:       # BB#0:
     79 ; X32-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     80 ; X32-SSE-NEXT:    retl
     81 ;
     82 ; X32-AVX-LABEL: loo:
     83 ; X32-AVX:       # BB#0:
     84 ; X32-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     85 ; X32-AVX-NEXT:    retl
     86 ;
     87 ; X64-SSE-LABEL: loo:
     88 ; X64-SSE:       # BB#0:
     89 ; X64-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
     90 ; X64-SSE-NEXT:    retq
     91 ;
     92 ; X64-AVX-LABEL: loo:
     93 ; X64-AVX:       # BB#0:
     94 ; X64-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
     95 ; X64-AVX-NEXT:    retq
     96   ret <2 x i64> <i64 -1, i64 -1>
     97 }
     98 
     99 define <2 x double> @doo() nounwind {
    100 ; X32-SSE-LABEL: doo:
    101 ; X32-SSE:       # BB#0:
    102 ; X32-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
    103 ; X32-SSE-NEXT:    retl
    104 ;
    105 ; X32-AVX-LABEL: doo:
    106 ; X32-AVX:       # BB#0:
    107 ; X32-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
    108 ; X32-AVX-NEXT:    retl
    109 ;
    110 ; X64-SSE-LABEL: doo:
    111 ; X64-SSE:       # BB#0:
    112 ; X64-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
    113 ; X64-SSE-NEXT:    retq
    114 ;
    115 ; X64-AVX-LABEL: doo:
    116 ; X64-AVX:       # BB#0:
    117 ; X64-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
    118 ; X64-AVX-NEXT:    retq
    119   ret <2 x double> <double 0xffffffffffffffff, double 0xffffffffffffffff>
    120 }
    121 
    122 define <4 x float> @foo() nounwind {
    123 ; X32-SSE-LABEL: foo:
    124 ; X32-SSE:       # BB#0:
    125 ; X32-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
    126 ; X32-SSE-NEXT:    retl
    127 ;
    128 ; X32-AVX-LABEL: foo:
    129 ; X32-AVX:       # BB#0:
    130 ; X32-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
    131 ; X32-AVX-NEXT:    retl
    132 ;
    133 ; X64-SSE-LABEL: foo:
    134 ; X64-SSE:       # BB#0:
    135 ; X64-SSE-NEXT:    pcmpeqd %xmm0, %xmm0
    136 ; X64-SSE-NEXT:    retq
    137 ;
    138 ; X64-AVX-LABEL: foo:
    139 ; X64-AVX:       # BB#0:
    140 ; X64-AVX-NEXT:    vpcmpeqd %xmm0, %xmm0, %xmm0
    141 ; X64-AVX-NEXT:    retq
    142   ret <4 x float> <float 0xffffffffe0000000, float 0xffffffffe0000000, float 0xffffffffe0000000, float 0xffffffffe0000000>
    143 }
    144