summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/legalize-shl-vec.ll
blob: 7ec2a663513f5b5c9403dd2cd2963aa9e5ea48fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
; RUN: llc < %s -march=x86-64 | FileCheck %s

define <2 x i256> @test_shl(<2 x i256> %In) {
  %Amt = insertelement <2 x i256> undef, i256 -1, i32 0
  %Out = shl <2 x i256> %In, %Amt
  ret <2 x i256> %Out

  ; CHECK-LABEL: test_shl
  ; CHECK:       movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK:       retq
}

define <2 x i256> @test_srl(<2 x i256> %In) {
  %Amt = insertelement <2 x i256> undef, i256 -1, i32 0
  %Out = lshr <2 x i256> %In, %Amt
  ret <2 x i256> %Out

  ; CHECK-LABEL: test_srl
  ; CHECK:       movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK-NEXT:  movq $0
  ; CHECK:       retq
}

define <2 x i256> @test_sra(<2 x i256> %In) {
  %Amt = insertelement <2 x i256> undef, i256 -1, i32 0
  %Out = ashr <2 x i256> %In, %Amt
  ret <2 x i256> %Out

  ; CHECK-LABEL: test_sra
  ; CHECK:       sarq $63
}
OpenPOWER on IntegriCloud