blob: f7dce6c27f2f33dc8ae8275c04877e097037c36c [file] [log] [blame]
Simon Pilgrim455460f2016-07-29 18:58:57 +00001; RUN: llc < %s -march=x86
2; RUN: llc < %s -march=x86-64
3
4;
5; Scalars
6;
7
8define void @test_lshr_i128(i128 %x, i128 %a, i128* nocapture %r) nounwind {
9entry:
10 %0 = lshr i128 %x, %a
11 store i128 %0, i128* %r, align 16
12 ret void
13}
14
15define void @test_ashr_i128(i128 %x, i128 %a, i128* nocapture %r) nounwind {
16entry:
17 %0 = ashr i128 %x, %a
18 store i128 %0, i128* %r, align 16
19 ret void
20}
21
22define void @test_shl_i128(i128 %x, i128 %a, i128* nocapture %r) nounwind {
23entry:
24 %0 = shl i128 %x, %a
25 store i128 %0, i128* %r, align 16
26 ret void
27}
28
29define void @test_lshr_i128_outofrange(i128 %x, i128* nocapture %r) nounwind {
30entry:
31 %0 = lshr i128 %x, -1
32 store i128 %0, i128* %r, align 16
33 ret void
34}
35
36define void @test_ashr_i128_outofrange(i128 %x, i128* nocapture %r) nounwind {
37entry:
38 %0 = ashr i128 %x, -1
39 store i128 %0, i128* %r, align 16
40 ret void
41}
42
43define void @test_shl_i128_outofrange(i128 %x, i128* nocapture %r) nounwind {
44entry:
45 %0 = shl i128 %x, -1
46 store i128 %0, i128* %r, align 16
47 ret void
48}
49
50;
51; Vectors
52;
53
54define void @test_lshr_v2i128(<2 x i128> %x, <2 x i128> %a, <2 x i128>* nocapture %r) nounwind {
55entry:
56 %0 = lshr <2 x i128> %x, %a
57 store <2 x i128> %0, <2 x i128>* %r, align 16
58 ret void
59}
60
61define void @test_ashr_v2i128(<2 x i128> %x, <2 x i128> %a, <2 x i128>* nocapture %r) nounwind {
62entry:
63 %0 = ashr <2 x i128> %x, %a
64 store <2 x i128> %0, <2 x i128>* %r, align 16
65 ret void
66}
67
68define void @test_shl_v2i128(<2 x i128> %x, <2 x i128> %a, <2 x i128>* nocapture %r) nounwind {
69entry:
70 %0 = shl <2 x i128> %x, %a
71 store <2 x i128> %0, <2 x i128>* %r, align 16
72 ret void
73}
74
75define void @test_lshr_v2i128_outofrange(<2 x i128> %x, <2 x i128>* nocapture %r) nounwind {
76entry:
77 %0 = lshr <2 x i128> %x, <i128 -1, i128 -1>
78 store <2 x i128> %0, <2 x i128>* %r, align 16
79 ret void
80}
81
82define void @test_ashr_v2i128_outofrange(<2 x i128> %x, <2 x i128>* nocapture %r) nounwind {
83entry:
84 %0 = ashr <2 x i128> %x, <i128 -1, i128 -1>
85 store <2 x i128> %0, <2 x i128>* %r, align 16
86 ret void
87}
88
89define void @test_shl_v2i128_outofrange(<2 x i128> %x, <2 x i128>* nocapture %r) nounwind {
90entry:
91 %0 = shl <2 x i128> %x, <i128 -1, i128 -1>
92 store <2 x i128> %0, <2 x i128>* %r, align 16
93 ret void
94}