xref: /aosp_15_r20/external/llvm/test/Bitcode/bitwiseInstructions.3.2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis < %s.bc| FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: verify-uselistorder < %s.bc
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; bitwiseOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
5*9880d681SAndroid Build Coastguard Worker; The test checks that LLVM does not misread bitwise instructions from
6*9880d681SAndroid Build Coastguard Worker; older bitcode files.
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdefine void @shl(i8 %x1){
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = shl i8 %x1, %x1
11*9880d681SAndroid Build Coastguard Worker  %res1 = shl i8 %x1, %x1
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; CHECK: %res2 = shl nuw i8 %x1, %x1
14*9880d681SAndroid Build Coastguard Worker  %res2 = shl nuw i8 %x1, %x1
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker; CHECK: %res3 = shl nsw i8 %x1, %x1
17*9880d681SAndroid Build Coastguard Worker  %res3 = shl nsw i8 %x1, %x1
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker; CHECK: %res4 = shl nuw nsw i8 %x1, %x1
20*9880d681SAndroid Build Coastguard Worker  %res4 = shl nuw nsw i8 %x1, %x1
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker  ret void
23*9880d681SAndroid Build Coastguard Worker}
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Workerdefine void @lshr(i8 %x1){
26*9880d681SAndroid Build Coastguard Workerentry:
27*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = lshr i8 %x1, %x1
28*9880d681SAndroid Build Coastguard Worker  %res1 = lshr i8 %x1, %x1
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Worker; CHECK: %res2 = lshr exact i8 %x1, %x1
31*9880d681SAndroid Build Coastguard Worker  %res2 = lshr exact i8 %x1, %x1
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Worker  ret void
34*9880d681SAndroid Build Coastguard Worker}
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Workerdefine void @ashr(i8 %x1){
37*9880d681SAndroid Build Coastguard Workerentry:
38*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = ashr i8 %x1, %x1
39*9880d681SAndroid Build Coastguard Worker  %res1 = ashr i8 %x1, %x1
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: %res2 = ashr exact i8 %x1, %x1
42*9880d681SAndroid Build Coastguard Worker  %res2 = ashr exact i8 %x1, %x1
43*9880d681SAndroid Build Coastguard Worker
44*9880d681SAndroid Build Coastguard Worker  ret void
45*9880d681SAndroid Build Coastguard Worker}
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Workerdefine void @and(i8 %x1){
48*9880d681SAndroid Build Coastguard Workerentry:
49*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = and i8 %x1, %x1
50*9880d681SAndroid Build Coastguard Worker  %res1 = and i8 %x1, %x1
51*9880d681SAndroid Build Coastguard Worker
52*9880d681SAndroid Build Coastguard Worker  ret void
53*9880d681SAndroid Build Coastguard Worker}
54*9880d681SAndroid Build Coastguard Worker
55*9880d681SAndroid Build Coastguard Workerdefine void @or(i8 %x1){
56*9880d681SAndroid Build Coastguard Workerentry:
57*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = or i8 %x1, %x1
58*9880d681SAndroid Build Coastguard Worker  %res1 = or i8 %x1, %x1
59*9880d681SAndroid Build Coastguard Worker
60*9880d681SAndroid Build Coastguard Worker  ret void
61*9880d681SAndroid Build Coastguard Worker}
62*9880d681SAndroid Build Coastguard Worker
63*9880d681SAndroid Build Coastguard Workerdefine void @xor(i8 %x1){
64*9880d681SAndroid Build Coastguard Workerentry:
65*9880d681SAndroid Build Coastguard Worker; CHECK: %res1 = xor i8 %x1, %x1
66*9880d681SAndroid Build Coastguard Worker  %res1 = xor i8 %x1, %x1
67*9880d681SAndroid Build Coastguard Worker
68*9880d681SAndroid Build Coastguard Worker  ret void
69*9880d681SAndroid Build Coastguard Worker}
70