• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=i686-pc-linux -mcpu=corei7-avx | FileCheck %s
2
3define <8 x i32> @shiftInput___vyuunu(<8 x i32> %input, i32 %shiftval, <8 x i32> %__mask) nounwind {
4allocas:
5  %smear.0 = insertelement <8 x i32> undef, i32 %shiftval, i32 0
6  %smear.1 = insertelement <8 x i32> %smear.0, i32 %shiftval, i32 1
7  %smear.2 = insertelement <8 x i32> %smear.1, i32 %shiftval, i32 2
8  %smear.3 = insertelement <8 x i32> %smear.2, i32 %shiftval, i32 3
9  %smear.4 = insertelement <8 x i32> %smear.3, i32 %shiftval, i32 4
10  %smear.5 = insertelement <8 x i32> %smear.4, i32 %shiftval, i32 5
11  %smear.6 = insertelement <8 x i32> %smear.5, i32 %shiftval, i32 6
12  %smear.7 = insertelement <8 x i32> %smear.6, i32 %shiftval, i32 7
13  %bitop = lshr <8 x i32> %input, %smear.7
14  ret <8 x i32> %bitop
15}
16
17; CHECK: shiftInput___vyuunu
18; CHECK: psrld
19; CHECK: psrld
20; CHECK: ret
21
22define <8 x i32> @shiftInput___canonical(<8 x i32> %input, i32 %shiftval, <8 x i32> %__mask) nounwind {
23allocas:
24  %smear.0 = insertelement <8 x i32> undef, i32 %shiftval, i32 0
25  %smear.7 = shufflevector <8 x i32> %smear.0, <8 x i32> undef, <8 x i32> zeroinitializer
26  %bitop = lshr <8 x i32> %input, %smear.7
27  ret <8 x i32> %bitop
28}
29
30; CHECK: shiftInput___canonical
31; CHECK: psrld
32; CHECK: psrld
33; CHECK: ret
34
35define <4 x i64> @shiftInput___64in32bitmode(<4 x i64> %input, i64 %shiftval, <4 x i64> %__mask) nounwind {
36allocas:
37  %smear.0 = insertelement <4 x i64> undef, i64 %shiftval, i32 0
38  %smear.7 = shufflevector <4 x i64> %smear.0, <4 x i64> undef, <4 x i32> zeroinitializer
39  %bitop = lshr <4 x i64> %input, %smear.7
40  ret <4 x i64> %bitop
41}
42
43; CHECK: shiftInput___64in32bitmode
44; CHECK: psrlq
45; CHECK: psrlq
46; CHECK: ret
47