Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: crosstest/test_arith_bool.ll

Issue 547033002: Subzero: Be more strict about i1 calculations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Revert unnecessary changes Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 ; ModuleID = '/tmp/tmpNm2zJj/test_arith.ll'
2 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64 :64:64-p:32:32:32-v128:32:32"
3 target triple = "i686-pc-linux-gnu"
4
5 ; This file was generated starting from Output/test_arith.pnacl.ll.
6 ; The testBool.*hh( functions were extracted, the hh changed to jj,
7 ; and the i8's changed to i1.
8
9 define i32 @_Z11testBoolAddjj(i32 %a, i32 %b) {
10 entry:
11 %b.arg_trunc = trunc i32 %b to i1
12 %a.arg_trunc = trunc i32 %a to i1
13 %add = add i1 %b.arg_trunc, %a.arg_trunc
14 %add.ret_ext = zext i1 %add to i32
15 ret i32 %add.ret_ext
16 }
17
18 define i32 @_Z11testBoolSubjj(i32 %a, i32 %b) {
19 entry:
20 %b.arg_trunc = trunc i32 %b to i1
21 %a.arg_trunc = trunc i32 %a to i1
22 %sub = sub i1 %a.arg_trunc, %b.arg_trunc
23 %sub.ret_ext = zext i1 %sub to i32
24 ret i32 %sub.ret_ext
25 }
26
27 define i32 @_Z11testBoolMuljj(i32 %a, i32 %b) {
28 entry:
29 %b.arg_trunc = trunc i32 %b to i1
30 %a.arg_trunc = trunc i32 %a to i1
31 %mul = mul i1 %b.arg_trunc, %a.arg_trunc
32 %mul.ret_ext = zext i1 %mul to i32
33 ret i32 %mul.ret_ext
34 }
35
36 define i32 @_Z12testBoolUdivjj(i32 %a, i32 %b) {
37 entry:
38 %b.arg_trunc = trunc i32 %b to i1
39 %a.arg_trunc = trunc i32 %a to i1
40 %div3 = udiv i1 %a.arg_trunc, %b.arg_trunc
41 %div3.ret_ext = zext i1 %div3 to i32
42 ret i32 %div3.ret_ext
43 }
44
45 define i32 @_Z12testBoolUremjj(i32 %a, i32 %b) {
46 entry:
47 %b.arg_trunc = trunc i32 %b to i1
48 %a.arg_trunc = trunc i32 %a to i1
49 %0 = urem i1 %a.arg_trunc, %b.arg_trunc
50 %.ret_ext = zext i1 %0 to i32
51 ret i32 %.ret_ext
52 }
53
54 define i32 @_Z11testBoolShljj(i32 %a, i32 %b) {
55 entry:
56 %b.arg_trunc = trunc i32 %b to i1
57 %a.arg_trunc = trunc i32 %a to i1
58 %conv = zext i1 %a.arg_trunc to i32
59 %conv1 = zext i1 %b.arg_trunc to i32
60 %shl = shl i32 %conv, %conv1
61 %conv2 = trunc i32 %shl to i1
62 %conv2.ret_ext = zext i1 %conv2 to i32
63 ret i32 %conv2.ret_ext
64 }
65
66 define i32 @_Z12testBoolLshrjj(i32 %a, i32 %b) {
67 entry:
68 %b.arg_trunc = trunc i32 %b to i1
69 %a.arg_trunc = trunc i32 %a to i1
70 %conv = zext i1 %a.arg_trunc to i32
71 %conv1 = zext i1 %b.arg_trunc to i32
72 %shr = lshr i32 %conv, %conv1
73 %conv2 = trunc i32 %shr to i1
74 %conv2.ret_ext = zext i1 %conv2 to i32
75 ret i32 %conv2.ret_ext
76 }
77
78 define i32 @_Z11testBoolAndjj(i32 %a, i32 %b) {
79 entry:
80 %b.arg_trunc = trunc i32 %b to i1
81 %a.arg_trunc = trunc i32 %a to i1
82 %and3 = and i1 %b.arg_trunc, %a.arg_trunc
83 %and3.ret_ext = zext i1 %and3 to i32
84 ret i32 %and3.ret_ext
85 }
86
87 define i32 @_Z10testBoolOrjj(i32 %a, i32 %b) {
88 entry:
89 %b.arg_trunc = trunc i32 %b to i1
90 %a.arg_trunc = trunc i32 %a to i1
91 %or3 = or i1 %b.arg_trunc, %a.arg_trunc
92 %or3.ret_ext = zext i1 %or3 to i32
93 ret i32 %or3.ret_ext
94 }
95
96 define i32 @_Z11testBoolXorjj(i32 %a, i32 %b) {
97 entry:
98 %b.arg_trunc = trunc i32 %b to i1
99 %a.arg_trunc = trunc i32 %a to i1
100 %xor3 = xor i1 %b.arg_trunc, %a.arg_trunc
101 %xor3.ret_ext = zext i1 %xor3 to i32
102 ret i32 %xor3.ret_ext
103 }
OLDNEW
« no previous file with comments | « crosstest/test_arith.cpp ('k') | crosstest/test_arith_main.cpp » ('j') | src/IceInstX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698