Add a triple to switch.ll test.
[oota-llvm.git] / test / CodeGen / X86 / shift-pcmp.ll
1 ; RUN: llc < %s -o - -mcpu=generic -march=x86-64 -mattr=+sse2 | FileCheck %s
2 ; RUN: llc < %s -o - -mcpu=generic -march=x86-64 -mattr=+avx | FileCheck %s
3
4 define <8 x i16> @foo(<8 x i16> %a, <8 x i16> %b) {
5 ; CHECK: .short       32
6 ; CHECK-NEXT: .short          32
7 ; CHECK-NEXT: .short          32
8 ; CHECK-NEXT: .short          32
9 ; CHECK-NEXT: .short          32
10 ; CHECK-NEXT: .short          32
11 ; CHECK-NEXT: .short          32
12 ; CHECK-NEXT: .short          32
13 ; CHECK-LABEL: {{^_?foo:}}
14 ; CHECK-NOT: psll
15 entry:
16   %icmp = icmp eq <8 x i16> %a, %b
17   %zext = zext <8 x i1> %icmp to <8 x i16>
18   %shl = shl nuw nsw <8 x i16> %zext, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
19   ret <8 x i16> %shl
20 }
21
22 ; Don't fail with an assert due to an undef in the buildvector
23 define <8 x i16> @bar(<8 x i16> %a, <8 x i16> %b) {
24 ; CHECK-LABEL: bar
25 entry:
26   %icmp = icmp eq <8 x i16> %a, %b
27   %zext = zext <8 x i1> %icmp to <8 x i16>
28   %shl = shl nuw nsw <8 x i16> %zext, <i16 5, i16 undef, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
29   ret <8 x i16> %shl
30 }