blob: aaaf4f543a8ebc385fbd73401983a5020e81b2c8 [file] [log] [blame]
Duncan P. N. Exon Smith15f92a32014-07-29 01:10:57 +00001; RUN: llvm-dis < %s.bc| FileCheck %s
Duncan P. N. Exon Smith13f5c582014-08-19 21:08:27 +00002; RUN: verify-uselistorder < %s.bc
Duncan P. N. Exon Smith15f92a32014-07-29 01:10:57 +00003
4; bitwiseOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
5; The test checks that LLVM does not misread bitwise instructions from
6; older bitcode files.
7
8define void @shl(i8 %x1){
9entry:
10; CHECK: %res1 = shl i8 %x1, %x1
11 %res1 = shl i8 %x1, %x1
12
13; CHECK: %res2 = shl nuw i8 %x1, %x1
14 %res2 = shl nuw i8 %x1, %x1
15
16; CHECK: %res3 = shl nsw i8 %x1, %x1
17 %res3 = shl nsw i8 %x1, %x1
18
19; CHECK: %res4 = shl nuw nsw i8 %x1, %x1
20 %res4 = shl nuw nsw i8 %x1, %x1
21
22 ret void
23}
24
25define void @lshr(i8 %x1){
26entry:
27; CHECK: %res1 = lshr i8 %x1, %x1
28 %res1 = lshr i8 %x1, %x1
29
30; CHECK: %res2 = lshr exact i8 %x1, %x1
31 %res2 = lshr exact i8 %x1, %x1
32
33 ret void
34}
35
36define void @ashr(i8 %x1){
37entry:
38; CHECK: %res1 = ashr i8 %x1, %x1
39 %res1 = ashr i8 %x1, %x1
40
41; CHECK-NEXT: %res2 = ashr exact i8 %x1, %x1
42 %res2 = ashr exact i8 %x1, %x1
43
44 ret void
45}
46
47define void @and(i8 %x1){
48entry:
49; CHECK: %res1 = and i8 %x1, %x1
50 %res1 = and i8 %x1, %x1
51
52 ret void
53}
54
55define void @or(i8 %x1){
56entry:
57; CHECK: %res1 = or i8 %x1, %x1
58 %res1 = or i8 %x1, %x1
59
60 ret void
61}
62
63define void @xor(i8 %x1){
64entry:
65; CHECK: %res1 = xor i8 %x1, %x1
66 %res1 = xor i8 %x1, %x1
67
68 ret void
69}