Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon -mcpu=hexagonv5 < %s | FileCheck %s |
| 2 | ; Generate MemOps for V4 and above. |
| 3 | |
| 4 | define void @memop_unsigned_char_add5(i8* nocapture %p) nounwind { |
| 5 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 6 | ; CHECK-LABEL: memop_unsigned_char_add5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 7 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 8 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 9 | %conv = zext i8 %0 to i32 |
| 10 | %add = add nsw i32 %conv, 5 |
| 11 | %conv1 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 12 | store i8 %conv1, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 13 | ret void |
| 14 | } |
| 15 | |
| 16 | define void @memop_unsigned_char_add(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 17 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 18 | ; CHECK-LABEL: memop_unsigned_char_add: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 19 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 20 | %conv = zext i8 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 21 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 22 | %conv1 = zext i8 %0 to i32 |
| 23 | %add = add nsw i32 %conv1, %conv |
| 24 | %conv2 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 25 | store i8 %conv2, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 26 | ret void |
| 27 | } |
| 28 | |
| 29 | define void @memop_unsigned_char_sub(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 30 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 31 | ; CHECK-LABEL: memop_unsigned_char_sub: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 32 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 33 | %conv = zext i8 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 34 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 35 | %conv1 = zext i8 %0 to i32 |
| 36 | %sub = sub nsw i32 %conv1, %conv |
| 37 | %conv2 = trunc i32 %sub to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 38 | store i8 %conv2, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 39 | ret void |
| 40 | } |
| 41 | |
| 42 | define void @memop_unsigned_char_or(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 43 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 44 | ; CHECK-LABEL: memop_unsigned_char_or: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 45 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 46 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 47 | %or3 = or i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 48 | store i8 %or3, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 49 | ret void |
| 50 | } |
| 51 | |
| 52 | define void @memop_unsigned_char_and(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 53 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 54 | ; CHECK-LABEL: memop_unsigned_char_and: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 55 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 56 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 57 | %and3 = and i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 58 | store i8 %and3, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 59 | ret void |
| 60 | } |
| 61 | |
| 62 | define void @memop_unsigned_char_clrbit(i8* nocapture %p) nounwind { |
| 63 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 64 | ; CHECK-LABEL: memop_unsigned_char_clrbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 65 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 66 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 67 | %conv = zext i8 %0 to i32 |
| 68 | %and = and i32 %conv, 223 |
| 69 | %conv1 = trunc i32 %and to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 70 | store i8 %conv1, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 71 | ret void |
| 72 | } |
| 73 | |
| 74 | define void @memop_unsigned_char_setbit(i8* nocapture %p) nounwind { |
| 75 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 76 | ; CHECK-LABEL: memop_unsigned_char_setbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 77 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 78 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 79 | %conv = zext i8 %0 to i32 |
| 80 | %or = or i32 %conv, 128 |
| 81 | %conv1 = trunc i32 %or to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 82 | store i8 %conv1, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 83 | ret void |
| 84 | } |
| 85 | |
| 86 | define void @memop_unsigned_char_add5_index(i8* nocapture %p, i32 %i) nounwind { |
| 87 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 88 | ; CHECK-LABEL: memop_unsigned_char_add5_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 89 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 90 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 91 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 92 | %conv = zext i8 %0 to i32 |
| 93 | %add = add nsw i32 %conv, 5 |
| 94 | %conv1 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 95 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 96 | ret void |
| 97 | } |
| 98 | |
| 99 | define void @memop_unsigned_char_add_index(i8* nocapture %p, i32 %i, i8 zeroext %x) nounwind { |
| 100 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 101 | ; CHECK-LABEL: memop_unsigned_char_add_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 102 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 103 | %conv = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 104 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 105 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 106 | %conv1 = zext i8 %0 to i32 |
| 107 | %add = add nsw i32 %conv1, %conv |
| 108 | %conv2 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 109 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 110 | ret void |
| 111 | } |
| 112 | |
| 113 | define void @memop_unsigned_char_sub_index(i8* nocapture %p, i32 %i, i8 zeroext %x) nounwind { |
| 114 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 115 | ; CHECK-LABEL: memop_unsigned_char_sub_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 116 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 117 | %conv = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 118 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 119 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 120 | %conv1 = zext i8 %0 to i32 |
| 121 | %sub = sub nsw i32 %conv1, %conv |
| 122 | %conv2 = trunc i32 %sub to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 123 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 124 | ret void |
| 125 | } |
| 126 | |
| 127 | define void @memop_unsigned_char_or_index(i8* nocapture %p, i32 %i, i8 zeroext %x) nounwind { |
| 128 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 129 | ; CHECK-LABEL: memop_unsigned_char_or_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 130 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 131 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 132 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 133 | %or3 = or i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 134 | store i8 %or3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 135 | ret void |
| 136 | } |
| 137 | |
| 138 | define void @memop_unsigned_char_and_index(i8* nocapture %p, i32 %i, i8 zeroext %x) nounwind { |
| 139 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 140 | ; CHECK-LABEL: memop_unsigned_char_and_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 141 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 142 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 143 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 144 | %and3 = and i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 145 | store i8 %and3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 146 | ret void |
| 147 | } |
| 148 | |
| 149 | define void @memop_unsigned_char_clrbit_index(i8* nocapture %p, i32 %i) nounwind { |
| 150 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 151 | ; CHECK-LABEL: memop_unsigned_char_clrbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 152 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 153 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 154 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 155 | %conv = zext i8 %0 to i32 |
| 156 | %and = and i32 %conv, 223 |
| 157 | %conv1 = trunc i32 %and to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 158 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 159 | ret void |
| 160 | } |
| 161 | |
| 162 | define void @memop_unsigned_char_setbit_index(i8* nocapture %p, i32 %i) nounwind { |
| 163 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 164 | ; CHECK-LABEL: memop_unsigned_char_setbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 165 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 166 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 167 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 168 | %conv = zext i8 %0 to i32 |
| 169 | %or = or i32 %conv, 128 |
| 170 | %conv1 = trunc i32 %or to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 171 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 172 | ret void |
| 173 | } |
| 174 | |
| 175 | define void @memop_unsigned_char_add5_index5(i8* nocapture %p) nounwind { |
| 176 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 177 | ; CHECK-LABEL: memop_unsigned_char_add5_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 178 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 179 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 180 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 181 | %conv = zext i8 %0 to i32 |
| 182 | %add = add nsw i32 %conv, 5 |
| 183 | %conv1 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 184 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 185 | ret void |
| 186 | } |
| 187 | |
| 188 | define void @memop_unsigned_char_add_index5(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 189 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 190 | ; CHECK-LABEL: memop_unsigned_char_add_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 191 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}+={{ *}}r{{[0-9]+}} |
| 192 | %conv = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 193 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 194 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 195 | %conv1 = zext i8 %0 to i32 |
| 196 | %add = add nsw i32 %conv1, %conv |
| 197 | %conv2 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 198 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 199 | ret void |
| 200 | } |
| 201 | |
| 202 | define void @memop_unsigned_char_sub_index5(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 203 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 204 | ; CHECK-LABEL: memop_unsigned_char_sub_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 205 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}-={{ *}}r{{[0-9]+}} |
| 206 | %conv = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 207 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 208 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 209 | %conv1 = zext i8 %0 to i32 |
| 210 | %sub = sub nsw i32 %conv1, %conv |
| 211 | %conv2 = trunc i32 %sub to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 212 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 213 | ret void |
| 214 | } |
| 215 | |
| 216 | define void @memop_unsigned_char_or_index5(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 217 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 218 | ; CHECK-LABEL: memop_unsigned_char_or_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 219 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 220 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 221 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 222 | %or3 = or i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 223 | store i8 %or3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 224 | ret void |
| 225 | } |
| 226 | |
| 227 | define void @memop_unsigned_char_and_index5(i8* nocapture %p, i8 zeroext %x) nounwind { |
| 228 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 229 | ; CHECK-LABEL: memop_unsigned_char_and_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 230 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 231 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 232 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 233 | %and3 = and i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 234 | store i8 %and3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 235 | ret void |
| 236 | } |
| 237 | |
| 238 | define void @memop_unsigned_char_clrbit_index5(i8* nocapture %p) nounwind { |
| 239 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 240 | ; CHECK-LABEL: memop_unsigned_char_clrbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 241 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 242 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 243 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 244 | %conv = zext i8 %0 to i32 |
| 245 | %and = and i32 %conv, 223 |
| 246 | %conv1 = trunc i32 %and to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 247 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 248 | ret void |
| 249 | } |
| 250 | |
| 251 | define void @memop_unsigned_char_setbit_index5(i8* nocapture %p) nounwind { |
| 252 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 253 | ; CHECK-LABEL: memop_unsigned_char_setbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 254 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 255 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 256 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 257 | %conv = zext i8 %0 to i32 |
| 258 | %or = or i32 %conv, 128 |
| 259 | %conv1 = trunc i32 %or to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 260 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 261 | ret void |
| 262 | } |
| 263 | |
| 264 | define void @memop_signed_char_add5(i8* nocapture %p) nounwind { |
| 265 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 266 | ; CHECK-LABEL: memop_signed_char_add5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 267 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 268 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 269 | %conv2 = zext i8 %0 to i32 |
| 270 | %add = add nsw i32 %conv2, 5 |
| 271 | %conv1 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 272 | store i8 %conv1, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 273 | ret void |
| 274 | } |
| 275 | |
| 276 | define void @memop_signed_char_add(i8* nocapture %p, i8 signext %x) nounwind { |
| 277 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 278 | ; CHECK-LABEL: memop_signed_char_add: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 279 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 280 | %conv4 = zext i8 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 281 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 282 | %conv13 = zext i8 %0 to i32 |
| 283 | %add = add nsw i32 %conv13, %conv4 |
| 284 | %conv2 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 285 | store i8 %conv2, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 286 | ret void |
| 287 | } |
| 288 | |
| 289 | define void @memop_signed_char_sub(i8* nocapture %p, i8 signext %x) nounwind { |
| 290 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 291 | ; CHECK-LABEL: memop_signed_char_sub: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 292 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 293 | %conv4 = zext i8 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 294 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 295 | %conv13 = zext i8 %0 to i32 |
| 296 | %sub = sub nsw i32 %conv13, %conv4 |
| 297 | %conv2 = trunc i32 %sub to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 298 | store i8 %conv2, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 299 | ret void |
| 300 | } |
| 301 | |
| 302 | define void @memop_signed_char_or(i8* nocapture %p, i8 signext %x) nounwind { |
| 303 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 304 | ; CHECK-LABEL: memop_signed_char_or: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 305 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 306 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 307 | %or3 = or i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 308 | store i8 %or3, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 309 | ret void |
| 310 | } |
| 311 | |
| 312 | define void @memop_signed_char_and(i8* nocapture %p, i8 signext %x) nounwind { |
| 313 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 314 | ; CHECK-LABEL: memop_signed_char_and: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 315 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 316 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 317 | %and3 = and i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 318 | store i8 %and3, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 319 | ret void |
| 320 | } |
| 321 | |
| 322 | define void @memop_signed_char_clrbit(i8* nocapture %p) nounwind { |
| 323 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 324 | ; CHECK-LABEL: memop_signed_char_clrbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 325 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 326 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 327 | %conv2 = zext i8 %0 to i32 |
| 328 | %and = and i32 %conv2, 223 |
| 329 | %conv1 = trunc i32 %and to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 330 | store i8 %conv1, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 331 | ret void |
| 332 | } |
| 333 | |
| 334 | define void @memop_signed_char_setbit(i8* nocapture %p) nounwind { |
| 335 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 336 | ; CHECK-LABEL: memop_signed_char_setbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 337 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 338 | %0 = load i8, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 339 | %conv2 = zext i8 %0 to i32 |
| 340 | %or = or i32 %conv2, 128 |
| 341 | %conv1 = trunc i32 %or to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 342 | store i8 %conv1, i8* %p, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 343 | ret void |
| 344 | } |
| 345 | |
| 346 | define void @memop_signed_char_add5_index(i8* nocapture %p, i32 %i) nounwind { |
| 347 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 348 | ; CHECK-LABEL: memop_signed_char_add5_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 349 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 350 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 351 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 352 | %conv2 = zext i8 %0 to i32 |
| 353 | %add = add nsw i32 %conv2, 5 |
| 354 | %conv1 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 355 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 356 | ret void |
| 357 | } |
| 358 | |
| 359 | define void @memop_signed_char_add_index(i8* nocapture %p, i32 %i, i8 signext %x) nounwind { |
| 360 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 361 | ; CHECK-LABEL: memop_signed_char_add_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 362 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 363 | %conv4 = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 364 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 365 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 366 | %conv13 = zext i8 %0 to i32 |
| 367 | %add = add nsw i32 %conv13, %conv4 |
| 368 | %conv2 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 369 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 370 | ret void |
| 371 | } |
| 372 | |
| 373 | define void @memop_signed_char_sub_index(i8* nocapture %p, i32 %i, i8 signext %x) nounwind { |
| 374 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 375 | ; CHECK-LABEL: memop_signed_char_sub_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 376 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 377 | %conv4 = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 378 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 379 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 380 | %conv13 = zext i8 %0 to i32 |
| 381 | %sub = sub nsw i32 %conv13, %conv4 |
| 382 | %conv2 = trunc i32 %sub to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 383 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 384 | ret void |
| 385 | } |
| 386 | |
| 387 | define void @memop_signed_char_or_index(i8* nocapture %p, i32 %i, i8 signext %x) nounwind { |
| 388 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 389 | ; CHECK-LABEL: memop_signed_char_or_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 390 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 391 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 392 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 393 | %or3 = or i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 394 | store i8 %or3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 395 | ret void |
| 396 | } |
| 397 | |
| 398 | define void @memop_signed_char_and_index(i8* nocapture %p, i32 %i, i8 signext %x) nounwind { |
| 399 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 400 | ; CHECK-LABEL: memop_signed_char_and_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 401 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 402 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 403 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 404 | %and3 = and i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 405 | store i8 %and3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 406 | ret void |
| 407 | } |
| 408 | |
| 409 | define void @memop_signed_char_clrbit_index(i8* nocapture %p, i32 %i) nounwind { |
| 410 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 411 | ; CHECK-LABEL: memop_signed_char_clrbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 412 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 413 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 414 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 415 | %conv2 = zext i8 %0 to i32 |
| 416 | %and = and i32 %conv2, 223 |
| 417 | %conv1 = trunc i32 %and to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 418 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 419 | ret void |
| 420 | } |
| 421 | |
| 422 | define void @memop_signed_char_setbit_index(i8* nocapture %p, i32 %i) nounwind { |
| 423 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 424 | ; CHECK-LABEL: memop_signed_char_setbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 425 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 426 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 427 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 428 | %conv2 = zext i8 %0 to i32 |
| 429 | %or = or i32 %conv2, 128 |
| 430 | %conv1 = trunc i32 %or to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 431 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 432 | ret void |
| 433 | } |
| 434 | |
| 435 | define void @memop_signed_char_add5_index5(i8* nocapture %p) nounwind { |
| 436 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 437 | ; CHECK-LABEL: memop_signed_char_add5_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 438 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 439 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 440 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 441 | %conv2 = zext i8 %0 to i32 |
| 442 | %add = add nsw i32 %conv2, 5 |
| 443 | %conv1 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 444 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 445 | ret void |
| 446 | } |
| 447 | |
| 448 | define void @memop_signed_char_add_index5(i8* nocapture %p, i8 signext %x) nounwind { |
| 449 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 450 | ; CHECK-LABEL: memop_signed_char_add_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 451 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}+={{ *}}r{{[0-9]+}} |
| 452 | %conv4 = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 453 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 454 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 455 | %conv13 = zext i8 %0 to i32 |
| 456 | %add = add nsw i32 %conv13, %conv4 |
| 457 | %conv2 = trunc i32 %add to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 458 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 459 | ret void |
| 460 | } |
| 461 | |
| 462 | define void @memop_signed_char_sub_index5(i8* nocapture %p, i8 signext %x) nounwind { |
| 463 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 464 | ; CHECK-LABEL: memop_signed_char_sub_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 465 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}-={{ *}}r{{[0-9]+}} |
| 466 | %conv4 = zext i8 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 467 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 468 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 469 | %conv13 = zext i8 %0 to i32 |
| 470 | %sub = sub nsw i32 %conv13, %conv4 |
| 471 | %conv2 = trunc i32 %sub to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 472 | store i8 %conv2, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 473 | ret void |
| 474 | } |
| 475 | |
| 476 | define void @memop_signed_char_or_index5(i8* nocapture %p, i8 signext %x) nounwind { |
| 477 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 478 | ; CHECK-LABEL: memop_signed_char_or_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 479 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 480 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 481 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 482 | %or3 = or i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 483 | store i8 %or3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 484 | ret void |
| 485 | } |
| 486 | |
| 487 | define void @memop_signed_char_and_index5(i8* nocapture %p, i8 signext %x) nounwind { |
| 488 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 489 | ; CHECK-LABEL: memop_signed_char_and_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 490 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 491 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 492 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 493 | %and3 = and i8 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 494 | store i8 %and3, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 495 | ret void |
| 496 | } |
| 497 | |
| 498 | define void @memop_signed_char_clrbit_index5(i8* nocapture %p) nounwind { |
| 499 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 500 | ; CHECK-LABEL: memop_signed_char_clrbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 501 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 502 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 503 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 504 | %conv2 = zext i8 %0 to i32 |
| 505 | %and = and i32 %conv2, 223 |
| 506 | %conv1 = trunc i32 %and to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 507 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 508 | ret void |
| 509 | } |
| 510 | |
| 511 | define void @memop_signed_char_setbit_index5(i8* nocapture %p) nounwind { |
| 512 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 513 | ; CHECK-LABEL: memop_signed_char_setbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 514 | ; CHECK: memb(r{{[0-9]+}}{{ *}}+{{ *}}#5){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 515 | %add.ptr = getelementptr inbounds i8, i8* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 516 | %0 = load i8, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 517 | %conv2 = zext i8 %0 to i32 |
| 518 | %or = or i32 %conv2, 128 |
| 519 | %conv1 = trunc i32 %or to i8 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 520 | store i8 %conv1, i8* %add.ptr, align 1 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 521 | ret void |
| 522 | } |
| 523 | |
| 524 | define void @memop_unsigned_short_add5(i16* nocapture %p) nounwind { |
| 525 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 526 | ; CHECK-LABEL: memop_unsigned_short_add5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 527 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 528 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 529 | %conv = zext i16 %0 to i32 |
| 530 | %add = add nsw i32 %conv, 5 |
| 531 | %conv1 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 532 | store i16 %conv1, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 533 | ret void |
| 534 | } |
| 535 | |
| 536 | define void @memop_unsigned_short_add(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 537 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 538 | ; CHECK-LABEL: memop_unsigned_short_add: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 539 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 540 | %conv = zext i16 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 541 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 542 | %conv1 = zext i16 %0 to i32 |
| 543 | %add = add nsw i32 %conv1, %conv |
| 544 | %conv2 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 545 | store i16 %conv2, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 546 | ret void |
| 547 | } |
| 548 | |
| 549 | define void @memop_unsigned_short_sub(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 550 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 551 | ; CHECK-LABEL: memop_unsigned_short_sub: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 552 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 553 | %conv = zext i16 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 554 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 555 | %conv1 = zext i16 %0 to i32 |
| 556 | %sub = sub nsw i32 %conv1, %conv |
| 557 | %conv2 = trunc i32 %sub to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 558 | store i16 %conv2, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 559 | ret void |
| 560 | } |
| 561 | |
| 562 | define void @memop_unsigned_short_or(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 563 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 564 | ; CHECK-LABEL: memop_unsigned_short_or: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 565 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 566 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 567 | %or3 = or i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 568 | store i16 %or3, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 569 | ret void |
| 570 | } |
| 571 | |
| 572 | define void @memop_unsigned_short_and(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 573 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 574 | ; CHECK-LABEL: memop_unsigned_short_and: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 575 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 576 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 577 | %and3 = and i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 578 | store i16 %and3, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 579 | ret void |
| 580 | } |
| 581 | |
| 582 | define void @memop_unsigned_short_clrbit(i16* nocapture %p) nounwind { |
| 583 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 584 | ; CHECK-LABEL: memop_unsigned_short_clrbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 585 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 586 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 587 | %conv = zext i16 %0 to i32 |
| 588 | %and = and i32 %conv, 65503 |
| 589 | %conv1 = trunc i32 %and to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 590 | store i16 %conv1, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 591 | ret void |
| 592 | } |
| 593 | |
| 594 | define void @memop_unsigned_short_setbit(i16* nocapture %p) nounwind { |
| 595 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 596 | ; CHECK-LABEL: memop_unsigned_short_setbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 597 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 598 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 599 | %conv = zext i16 %0 to i32 |
| 600 | %or = or i32 %conv, 128 |
| 601 | %conv1 = trunc i32 %or to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 602 | store i16 %conv1, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 603 | ret void |
| 604 | } |
| 605 | |
| 606 | define void @memop_unsigned_short_add5_index(i16* nocapture %p, i32 %i) nounwind { |
| 607 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 608 | ; CHECK-LABEL: memop_unsigned_short_add5_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 609 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 610 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 611 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 612 | %conv = zext i16 %0 to i32 |
| 613 | %add = add nsw i32 %conv, 5 |
| 614 | %conv1 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 615 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 616 | ret void |
| 617 | } |
| 618 | |
| 619 | define void @memop_unsigned_short_add_index(i16* nocapture %p, i32 %i, i16 zeroext %x) nounwind { |
| 620 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 621 | ; CHECK-LABEL: memop_unsigned_short_add_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 622 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 623 | %conv = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 624 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 625 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 626 | %conv1 = zext i16 %0 to i32 |
| 627 | %add = add nsw i32 %conv1, %conv |
| 628 | %conv2 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 629 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 630 | ret void |
| 631 | } |
| 632 | |
| 633 | define void @memop_unsigned_short_sub_index(i16* nocapture %p, i32 %i, i16 zeroext %x) nounwind { |
| 634 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 635 | ; CHECK-LABEL: memop_unsigned_short_sub_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 636 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 637 | %conv = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 638 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 639 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 640 | %conv1 = zext i16 %0 to i32 |
| 641 | %sub = sub nsw i32 %conv1, %conv |
| 642 | %conv2 = trunc i32 %sub to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 643 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 644 | ret void |
| 645 | } |
| 646 | |
| 647 | define void @memop_unsigned_short_or_index(i16* nocapture %p, i32 %i, i16 zeroext %x) nounwind { |
| 648 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 649 | ; CHECK-LABEL: memop_unsigned_short_or_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 650 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 651 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 652 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 653 | %or3 = or i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 654 | store i16 %or3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 655 | ret void |
| 656 | } |
| 657 | |
| 658 | define void @memop_unsigned_short_and_index(i16* nocapture %p, i32 %i, i16 zeroext %x) nounwind { |
| 659 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 660 | ; CHECK-LABEL: memop_unsigned_short_and_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 661 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 662 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 663 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 664 | %and3 = and i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 665 | store i16 %and3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 666 | ret void |
| 667 | } |
| 668 | |
| 669 | define void @memop_unsigned_short_clrbit_index(i16* nocapture %p, i32 %i) nounwind { |
| 670 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 671 | ; CHECK-LABEL: memop_unsigned_short_clrbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 672 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 673 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 674 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 675 | %conv = zext i16 %0 to i32 |
| 676 | %and = and i32 %conv, 65503 |
| 677 | %conv1 = trunc i32 %and to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 678 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 679 | ret void |
| 680 | } |
| 681 | |
| 682 | define void @memop_unsigned_short_setbit_index(i16* nocapture %p, i32 %i) nounwind { |
| 683 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 684 | ; CHECK-LABEL: memop_unsigned_short_setbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 685 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 686 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 687 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 688 | %conv = zext i16 %0 to i32 |
| 689 | %or = or i32 %conv, 128 |
| 690 | %conv1 = trunc i32 %or to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 691 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 692 | ret void |
| 693 | } |
| 694 | |
| 695 | define void @memop_unsigned_short_add5_index5(i16* nocapture %p) nounwind { |
| 696 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 697 | ; CHECK-LABEL: memop_unsigned_short_add5_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 698 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 699 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 700 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 701 | %conv = zext i16 %0 to i32 |
| 702 | %add = add nsw i32 %conv, 5 |
| 703 | %conv1 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 704 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 705 | ret void |
| 706 | } |
| 707 | |
| 708 | define void @memop_unsigned_short_add_index5(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 709 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 710 | ; CHECK-LABEL: memop_unsigned_short_add_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 711 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}+={{ *}}r{{[0-9]+}} |
| 712 | %conv = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 713 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 714 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 715 | %conv1 = zext i16 %0 to i32 |
| 716 | %add = add nsw i32 %conv1, %conv |
| 717 | %conv2 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 718 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 719 | ret void |
| 720 | } |
| 721 | |
| 722 | define void @memop_unsigned_short_sub_index5(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 723 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 724 | ; CHECK-LABEL: memop_unsigned_short_sub_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 725 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}-={{ *}}r{{[0-9]+}} |
| 726 | %conv = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 727 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 728 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 729 | %conv1 = zext i16 %0 to i32 |
| 730 | %sub = sub nsw i32 %conv1, %conv |
| 731 | %conv2 = trunc i32 %sub to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 732 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 733 | ret void |
| 734 | } |
| 735 | |
| 736 | define void @memop_unsigned_short_or_index5(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 737 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 738 | ; CHECK-LABEL: memop_unsigned_short_or_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 739 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 740 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 741 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 742 | %or3 = or i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 743 | store i16 %or3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 744 | ret void |
| 745 | } |
| 746 | |
| 747 | define void @memop_unsigned_short_and_index5(i16* nocapture %p, i16 zeroext %x) nounwind { |
| 748 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 749 | ; CHECK-LABEL: memop_unsigned_short_and_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 750 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 751 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 752 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 753 | %and3 = and i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 754 | store i16 %and3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 755 | ret void |
| 756 | } |
| 757 | |
| 758 | define void @memop_unsigned_short_clrbit_index5(i16* nocapture %p) nounwind { |
| 759 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 760 | ; CHECK-LABEL: memop_unsigned_short_clrbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 761 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 762 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 763 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 764 | %conv = zext i16 %0 to i32 |
| 765 | %and = and i32 %conv, 65503 |
| 766 | %conv1 = trunc i32 %and to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 767 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 768 | ret void |
| 769 | } |
| 770 | |
| 771 | define void @memop_unsigned_short_setbit_index5(i16* nocapture %p) nounwind { |
| 772 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 773 | ; CHECK-LABEL: memop_unsigned_short_setbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 774 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 775 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 776 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 777 | %conv = zext i16 %0 to i32 |
| 778 | %or = or i32 %conv, 128 |
| 779 | %conv1 = trunc i32 %or to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 780 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 781 | ret void |
| 782 | } |
| 783 | |
| 784 | define void @memop_signed_short_add5(i16* nocapture %p) nounwind { |
| 785 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 786 | ; CHECK-LABEL: memop_signed_short_add5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 787 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 788 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 789 | %conv2 = zext i16 %0 to i32 |
| 790 | %add = add nsw i32 %conv2, 5 |
| 791 | %conv1 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 792 | store i16 %conv1, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 793 | ret void |
| 794 | } |
| 795 | |
| 796 | define void @memop_signed_short_add(i16* nocapture %p, i16 signext %x) nounwind { |
| 797 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 798 | ; CHECK-LABEL: memop_signed_short_add: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 799 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 800 | %conv4 = zext i16 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 801 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 802 | %conv13 = zext i16 %0 to i32 |
| 803 | %add = add nsw i32 %conv13, %conv4 |
| 804 | %conv2 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 805 | store i16 %conv2, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 806 | ret void |
| 807 | } |
| 808 | |
| 809 | define void @memop_signed_short_sub(i16* nocapture %p, i16 signext %x) nounwind { |
| 810 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 811 | ; CHECK-LABEL: memop_signed_short_sub: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 812 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 813 | %conv4 = zext i16 %x to i32 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 814 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 815 | %conv13 = zext i16 %0 to i32 |
| 816 | %sub = sub nsw i32 %conv13, %conv4 |
| 817 | %conv2 = trunc i32 %sub to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 818 | store i16 %conv2, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 819 | ret void |
| 820 | } |
| 821 | |
| 822 | define void @memop_signed_short_or(i16* nocapture %p, i16 signext %x) nounwind { |
| 823 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 824 | ; CHECK-LABEL: memop_signed_short_or: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 825 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 826 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 827 | %or3 = or i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 828 | store i16 %or3, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 829 | ret void |
| 830 | } |
| 831 | |
| 832 | define void @memop_signed_short_and(i16* nocapture %p, i16 signext %x) nounwind { |
| 833 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 834 | ; CHECK-LABEL: memop_signed_short_and: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 835 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 836 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 837 | %and3 = and i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 838 | store i16 %and3, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 839 | ret void |
| 840 | } |
| 841 | |
| 842 | define void @memop_signed_short_clrbit(i16* nocapture %p) nounwind { |
| 843 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 844 | ; CHECK-LABEL: memop_signed_short_clrbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 845 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 846 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 847 | %conv2 = zext i16 %0 to i32 |
| 848 | %and = and i32 %conv2, 65503 |
| 849 | %conv1 = trunc i32 %and to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 850 | store i16 %conv1, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 851 | ret void |
| 852 | } |
| 853 | |
| 854 | define void @memop_signed_short_setbit(i16* nocapture %p) nounwind { |
| 855 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 856 | ; CHECK-LABEL: memop_signed_short_setbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 857 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 858 | %0 = load i16, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 859 | %conv2 = zext i16 %0 to i32 |
| 860 | %or = or i32 %conv2, 128 |
| 861 | %conv1 = trunc i32 %or to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 862 | store i16 %conv1, i16* %p, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 863 | ret void |
| 864 | } |
| 865 | |
| 866 | define void @memop_signed_short_add5_index(i16* nocapture %p, i32 %i) nounwind { |
| 867 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 868 | ; CHECK-LABEL: memop_signed_short_add5_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 869 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 870 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 871 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 872 | %conv2 = zext i16 %0 to i32 |
| 873 | %add = add nsw i32 %conv2, 5 |
| 874 | %conv1 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 875 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 876 | ret void |
| 877 | } |
| 878 | |
| 879 | define void @memop_signed_short_add_index(i16* nocapture %p, i32 %i, i16 signext %x) nounwind { |
| 880 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 881 | ; CHECK-LABEL: memop_signed_short_add_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 882 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
| 883 | %conv4 = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 884 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 885 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 886 | %conv13 = zext i16 %0 to i32 |
| 887 | %add = add nsw i32 %conv13, %conv4 |
| 888 | %conv2 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 889 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 890 | ret void |
| 891 | } |
| 892 | |
| 893 | define void @memop_signed_short_sub_index(i16* nocapture %p, i32 %i, i16 signext %x) nounwind { |
| 894 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 895 | ; CHECK-LABEL: memop_signed_short_sub_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 896 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
| 897 | %conv4 = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 898 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 899 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 900 | %conv13 = zext i16 %0 to i32 |
| 901 | %sub = sub nsw i32 %conv13, %conv4 |
| 902 | %conv2 = trunc i32 %sub to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 903 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 904 | ret void |
| 905 | } |
| 906 | |
| 907 | define void @memop_signed_short_or_index(i16* nocapture %p, i32 %i, i16 signext %x) nounwind { |
| 908 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 909 | ; CHECK-LABEL: memop_signed_short_or_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 910 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 911 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 912 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 913 | %or3 = or i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 914 | store i16 %or3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 915 | ret void |
| 916 | } |
| 917 | |
| 918 | define void @memop_signed_short_and_index(i16* nocapture %p, i32 %i, i16 signext %x) nounwind { |
| 919 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 920 | ; CHECK-LABEL: memop_signed_short_and_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 921 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 922 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 923 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 924 | %and3 = and i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 925 | store i16 %and3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 926 | ret void |
| 927 | } |
| 928 | |
| 929 | define void @memop_signed_short_clrbit_index(i16* nocapture %p, i32 %i) nounwind { |
| 930 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 931 | ; CHECK-LABEL: memop_signed_short_clrbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 932 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 933 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 934 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 935 | %conv2 = zext i16 %0 to i32 |
| 936 | %and = and i32 %conv2, 65503 |
| 937 | %conv1 = trunc i32 %and to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 938 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 939 | ret void |
| 940 | } |
| 941 | |
| 942 | define void @memop_signed_short_setbit_index(i16* nocapture %p, i32 %i) nounwind { |
| 943 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 944 | ; CHECK-LABEL: memop_signed_short_setbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 945 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 946 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 947 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 948 | %conv2 = zext i16 %0 to i32 |
| 949 | %or = or i32 %conv2, 128 |
| 950 | %conv1 = trunc i32 %or to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 951 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 952 | ret void |
| 953 | } |
| 954 | |
| 955 | define void @memop_signed_short_add5_index5(i16* nocapture %p) nounwind { |
| 956 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 957 | ; CHECK-LABEL: memop_signed_short_add5_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 958 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 959 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 960 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 961 | %conv2 = zext i16 %0 to i32 |
| 962 | %add = add nsw i32 %conv2, 5 |
| 963 | %conv1 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 964 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 965 | ret void |
| 966 | } |
| 967 | |
| 968 | define void @memop_signed_short_add_index5(i16* nocapture %p, i16 signext %x) nounwind { |
| 969 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 970 | ; CHECK-LABEL: memop_signed_short_add_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 971 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}+={{ *}}r{{[0-9]+}} |
| 972 | %conv4 = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 973 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 974 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 975 | %conv13 = zext i16 %0 to i32 |
| 976 | %add = add nsw i32 %conv13, %conv4 |
| 977 | %conv2 = trunc i32 %add to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 978 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 979 | ret void |
| 980 | } |
| 981 | |
| 982 | define void @memop_signed_short_sub_index5(i16* nocapture %p, i16 signext %x) nounwind { |
| 983 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 984 | ; CHECK-LABEL: memop_signed_short_sub_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 985 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}-={{ *}}r{{[0-9]+}} |
| 986 | %conv4 = zext i16 %x to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 987 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 988 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 989 | %conv13 = zext i16 %0 to i32 |
| 990 | %sub = sub nsw i32 %conv13, %conv4 |
| 991 | %conv2 = trunc i32 %sub to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 992 | store i16 %conv2, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 993 | ret void |
| 994 | } |
| 995 | |
| 996 | define void @memop_signed_short_or_index5(i16* nocapture %p, i16 signext %x) nounwind { |
| 997 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 998 | ; CHECK-LABEL: memop_signed_short_or_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 999 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1000 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1001 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1002 | %or3 = or i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1003 | store i16 %or3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1004 | ret void |
| 1005 | } |
| 1006 | |
| 1007 | define void @memop_signed_short_and_index5(i16* nocapture %p, i16 signext %x) nounwind { |
| 1008 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1009 | ; CHECK-LABEL: memop_signed_short_and_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1010 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1011 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1012 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1013 | %and3 = and i16 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1014 | store i16 %and3, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1015 | ret void |
| 1016 | } |
| 1017 | |
| 1018 | define void @memop_signed_short_clrbit_index5(i16* nocapture %p) nounwind { |
| 1019 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1020 | ; CHECK-LABEL: memop_signed_short_clrbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1021 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1022 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1023 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1024 | %conv2 = zext i16 %0 to i32 |
| 1025 | %and = and i32 %conv2, 65503 |
| 1026 | %conv1 = trunc i32 %and to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1027 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1028 | ret void |
| 1029 | } |
| 1030 | |
| 1031 | define void @memop_signed_short_setbit_index5(i16* nocapture %p) nounwind { |
| 1032 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1033 | ; CHECK-LABEL: memop_signed_short_setbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1034 | ; CHECK: memh(r{{[0-9]+}}{{ *}}+{{ *}}#10){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1035 | %add.ptr = getelementptr inbounds i16, i16* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1036 | %0 = load i16, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1037 | %conv2 = zext i16 %0 to i32 |
| 1038 | %or = or i32 %conv2, 128 |
| 1039 | %conv1 = trunc i32 %or to i16 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1040 | store i16 %conv1, i16* %add.ptr, align 2 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1041 | ret void |
| 1042 | } |
| 1043 | |
| 1044 | define void @memop_signed_int_add5(i32* nocapture %p) nounwind { |
| 1045 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1046 | ; CHECK-LABEL: memop_signed_int_add5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1047 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1048 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1049 | %add = add i32 %0, 5 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1050 | store i32 %add, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1051 | ret void |
| 1052 | } |
| 1053 | |
| 1054 | define void @memop_signed_int_add(i32* nocapture %p, i32 %x) nounwind { |
| 1055 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1056 | ; CHECK-LABEL: memop_signed_int_add: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1057 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1058 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1059 | %add = add i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1060 | store i32 %add, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1061 | ret void |
| 1062 | } |
| 1063 | |
| 1064 | define void @memop_signed_int_sub(i32* nocapture %p, i32 %x) nounwind { |
| 1065 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1066 | ; CHECK-LABEL: memop_signed_int_sub: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1067 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1068 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1069 | %sub = sub i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1070 | store i32 %sub, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1071 | ret void |
| 1072 | } |
| 1073 | |
| 1074 | define void @memop_signed_int_or(i32* nocapture %p, i32 %x) nounwind { |
| 1075 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1076 | ; CHECK-LABEL: memop_signed_int_or: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1077 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1078 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1079 | %or = or i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1080 | store i32 %or, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1081 | ret void |
| 1082 | } |
| 1083 | |
| 1084 | define void @memop_signed_int_and(i32* nocapture %p, i32 %x) nounwind { |
| 1085 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1086 | ; CHECK-LABEL: memop_signed_int_and: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1087 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1088 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1089 | %and = and i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1090 | store i32 %and, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1091 | ret void |
| 1092 | } |
| 1093 | |
| 1094 | define void @memop_signed_int_clrbit(i32* nocapture %p) nounwind { |
| 1095 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1096 | ; CHECK-LABEL: memop_signed_int_clrbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1097 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1098 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1099 | %and = and i32 %0, -33 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1100 | store i32 %and, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1101 | ret void |
| 1102 | } |
| 1103 | |
| 1104 | define void @memop_signed_int_setbit(i32* nocapture %p) nounwind { |
| 1105 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1106 | ; CHECK-LABEL: memop_signed_int_setbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1107 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1108 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1109 | %or = or i32 %0, 128 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1110 | store i32 %or, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1111 | ret void |
| 1112 | } |
| 1113 | |
| 1114 | define void @memop_signed_int_add5_index(i32* nocapture %p, i32 %i) nounwind { |
| 1115 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1116 | ; CHECK-LABEL: memop_signed_int_add5_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1117 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1118 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1119 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1120 | %add = add i32 %0, 5 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1121 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1122 | ret void |
| 1123 | } |
| 1124 | |
| 1125 | define void @memop_signed_int_add_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1126 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1127 | ; CHECK-LABEL: memop_signed_int_add_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1128 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1129 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1130 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1131 | %add = add i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1132 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1133 | ret void |
| 1134 | } |
| 1135 | |
| 1136 | define void @memop_signed_int_sub_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1137 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1138 | ; CHECK-LABEL: memop_signed_int_sub_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1139 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1140 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1141 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1142 | %sub = sub i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1143 | store i32 %sub, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1144 | ret void |
| 1145 | } |
| 1146 | |
| 1147 | define void @memop_signed_int_or_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1148 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1149 | ; CHECK-LABEL: memop_signed_int_or_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1150 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1151 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1152 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1153 | %or = or i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1154 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1155 | ret void |
| 1156 | } |
| 1157 | |
| 1158 | define void @memop_signed_int_and_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1159 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1160 | ; CHECK-LABEL: memop_signed_int_and_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1161 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1162 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1163 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1164 | %and = and i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1165 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1166 | ret void |
| 1167 | } |
| 1168 | |
| 1169 | define void @memop_signed_int_clrbit_index(i32* nocapture %p, i32 %i) nounwind { |
| 1170 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1171 | ; CHECK-LABEL: memop_signed_int_clrbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1172 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1173 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1174 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1175 | %and = and i32 %0, -33 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1176 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1177 | ret void |
| 1178 | } |
| 1179 | |
| 1180 | define void @memop_signed_int_setbit_index(i32* nocapture %p, i32 %i) nounwind { |
| 1181 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1182 | ; CHECK-LABEL: memop_signed_int_setbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1183 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1184 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1185 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1186 | %or = or i32 %0, 128 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1187 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1188 | ret void |
| 1189 | } |
| 1190 | |
| 1191 | define void @memop_signed_int_add5_index5(i32* nocapture %p) nounwind { |
| 1192 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1193 | ; CHECK-LABEL: memop_signed_int_add5_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1194 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1195 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1196 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1197 | %add = add i32 %0, 5 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1198 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1199 | ret void |
| 1200 | } |
| 1201 | |
| 1202 | define void @memop_signed_int_add_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1203 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1204 | ; CHECK-LABEL: memop_signed_int_add_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1205 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}+={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1206 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1207 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1208 | %add = add i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1209 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1210 | ret void |
| 1211 | } |
| 1212 | |
| 1213 | define void @memop_signed_int_sub_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1214 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1215 | ; CHECK-LABEL: memop_signed_int_sub_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1216 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}-={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1217 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1218 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1219 | %sub = sub i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1220 | store i32 %sub, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1221 | ret void |
| 1222 | } |
| 1223 | |
| 1224 | define void @memop_signed_int_or_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1225 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1226 | ; CHECK-LABEL: memop_signed_int_or_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1227 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1228 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1229 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1230 | %or = or i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1231 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1232 | ret void |
| 1233 | } |
| 1234 | |
| 1235 | define void @memop_signed_int_and_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1236 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1237 | ; CHECK-LABEL: memop_signed_int_and_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1238 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1239 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1240 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1241 | %and = and i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1242 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1243 | ret void |
| 1244 | } |
| 1245 | |
| 1246 | define void @memop_signed_int_clrbit_index5(i32* nocapture %p) nounwind { |
| 1247 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1248 | ; CHECK-LABEL: memop_signed_int_clrbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1249 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1250 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1251 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1252 | %and = and i32 %0, -33 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1253 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1254 | ret void |
| 1255 | } |
| 1256 | |
| 1257 | define void @memop_signed_int_setbit_index5(i32* nocapture %p) nounwind { |
| 1258 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1259 | ; CHECK-LABEL: memop_signed_int_setbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1260 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1261 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1262 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1263 | %or = or i32 %0, 128 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1264 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1265 | ret void |
| 1266 | } |
| 1267 | |
| 1268 | define void @memop_unsigned_int_add5(i32* nocapture %p) nounwind { |
| 1269 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1270 | ; CHECK-LABEL: memop_unsigned_int_add5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1271 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1272 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1273 | %add = add nsw i32 %0, 5 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1274 | store i32 %add, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1275 | ret void |
| 1276 | } |
| 1277 | |
| 1278 | define void @memop_unsigned_int_add(i32* nocapture %p, i32 %x) nounwind { |
| 1279 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1280 | ; CHECK-LABEL: memop_unsigned_int_add: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1281 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1282 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1283 | %add = add nsw i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1284 | store i32 %add, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1285 | ret void |
| 1286 | } |
| 1287 | |
| 1288 | define void @memop_unsigned_int_sub(i32* nocapture %p, i32 %x) nounwind { |
| 1289 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1290 | ; CHECK-LABEL: memop_unsigned_int_sub: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1291 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1292 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1293 | %sub = sub nsw i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1294 | store i32 %sub, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1295 | ret void |
| 1296 | } |
| 1297 | |
| 1298 | define void @memop_unsigned_int_or(i32* nocapture %p, i32 %x) nounwind { |
| 1299 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1300 | ; CHECK-LABEL: memop_unsigned_int_or: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1301 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1302 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1303 | %or = or i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1304 | store i32 %or, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1305 | ret void |
| 1306 | } |
| 1307 | |
| 1308 | define void @memop_unsigned_int_and(i32* nocapture %p, i32 %x) nounwind { |
| 1309 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1310 | ; CHECK-LABEL: memop_unsigned_int_and: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1311 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1312 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1313 | %and = and i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1314 | store i32 %and, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1315 | ret void |
| 1316 | } |
| 1317 | |
| 1318 | define void @memop_unsigned_int_clrbit(i32* nocapture %p) nounwind { |
| 1319 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1320 | ; CHECK-LABEL: memop_unsigned_int_clrbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1321 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1322 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1323 | %and = and i32 %0, -33 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1324 | store i32 %and, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1325 | ret void |
| 1326 | } |
| 1327 | |
| 1328 | define void @memop_unsigned_int_setbit(i32* nocapture %p) nounwind { |
| 1329 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1330 | ; CHECK-LABEL: memop_unsigned_int_setbit: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1331 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1332 | %0 = load i32, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1333 | %or = or i32 %0, 128 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1334 | store i32 %or, i32* %p, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1335 | ret void |
| 1336 | } |
| 1337 | |
| 1338 | define void @memop_unsigned_int_add5_index(i32* nocapture %p, i32 %i) nounwind { |
| 1339 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1340 | ; CHECK-LABEL: memop_unsigned_int_add5_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1341 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1342 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1343 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1344 | %add = add nsw i32 %0, 5 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1345 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1346 | ret void |
| 1347 | } |
| 1348 | |
| 1349 | define void @memop_unsigned_int_add_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1350 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1351 | ; CHECK-LABEL: memop_unsigned_int_add_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1352 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}+={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1353 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1354 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1355 | %add = add nsw i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1356 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1357 | ret void |
| 1358 | } |
| 1359 | |
| 1360 | define void @memop_unsigned_int_sub_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1361 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1362 | ; CHECK-LABEL: memop_unsigned_int_sub_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1363 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}-={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1364 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1365 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1366 | %sub = sub nsw i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1367 | store i32 %sub, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1368 | ret void |
| 1369 | } |
| 1370 | |
| 1371 | define void @memop_unsigned_int_or_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1372 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1373 | ; CHECK-LABEL: memop_unsigned_int_or_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1374 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1375 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1376 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1377 | %or = or i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1378 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1379 | ret void |
| 1380 | } |
| 1381 | |
| 1382 | define void @memop_unsigned_int_and_index(i32* nocapture %p, i32 %i, i32 %x) nounwind { |
| 1383 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1384 | ; CHECK-LABEL: memop_unsigned_int_and_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1385 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1386 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1387 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1388 | %and = and i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1389 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1390 | ret void |
| 1391 | } |
| 1392 | |
| 1393 | define void @memop_unsigned_int_clrbit_index(i32* nocapture %p, i32 %i) nounwind { |
| 1394 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1395 | ; CHECK-LABEL: memop_unsigned_int_clrbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1396 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1397 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1398 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1399 | %and = and i32 %0, -33 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1400 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1401 | ret void |
| 1402 | } |
| 1403 | |
| 1404 | define void @memop_unsigned_int_setbit_index(i32* nocapture %p, i32 %i) nounwind { |
| 1405 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1406 | ; CHECK-LABEL: memop_unsigned_int_setbit_index: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1407 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#0){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1408 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 %i |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1409 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1410 | %or = or i32 %0, 128 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1411 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1412 | ret void |
| 1413 | } |
| 1414 | |
| 1415 | define void @memop_unsigned_int_add5_index5(i32* nocapture %p) nounwind { |
| 1416 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1417 | ; CHECK-LABEL: memop_unsigned_int_add5_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1418 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}+={{ *}}#5 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1419 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1420 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1421 | %add = add nsw i32 %0, 5 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1422 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1423 | ret void |
| 1424 | } |
| 1425 | |
| 1426 | define void @memop_unsigned_int_add_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1427 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1428 | ; CHECK-LABEL: memop_unsigned_int_add_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1429 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}+={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1430 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1431 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1432 | %add = add nsw i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1433 | store i32 %add, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1434 | ret void |
| 1435 | } |
| 1436 | |
| 1437 | define void @memop_unsigned_int_sub_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1438 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1439 | ; CHECK-LABEL: memop_unsigned_int_sub_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1440 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}-={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1441 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1442 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1443 | %sub = sub nsw i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1444 | store i32 %sub, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1445 | ret void |
| 1446 | } |
| 1447 | |
| 1448 | define void @memop_unsigned_int_or_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1449 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1450 | ; CHECK-LABEL: memop_unsigned_int_or_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1451 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}|={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1452 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1453 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1454 | %or = or i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1455 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1456 | ret void |
| 1457 | } |
| 1458 | |
| 1459 | define void @memop_unsigned_int_and_index5(i32* nocapture %p, i32 %x) nounwind { |
| 1460 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1461 | ; CHECK-LABEL: memop_unsigned_int_and_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1462 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}&={{ *}}r{{[0-9]+}} |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1463 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1464 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1465 | %and = and i32 %0, %x |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1466 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1467 | ret void |
| 1468 | } |
| 1469 | |
| 1470 | define void @memop_unsigned_int_clrbit_index5(i32* nocapture %p) nounwind { |
| 1471 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1472 | ; CHECK-LABEL: memop_unsigned_int_clrbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1473 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}={{ *}}clrbit({{ *}}#5{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1474 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1475 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1476 | %and = and i32 %0, -33 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1477 | store i32 %and, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1478 | ret void |
| 1479 | } |
| 1480 | |
| 1481 | define void @memop_unsigned_int_setbit_index5(i32* nocapture %p) nounwind { |
| 1482 | entry: |
Krzysztof Parzyszek | bba0bf7 | 2016-07-15 15:35:52 +0000 | [diff] [blame] | 1483 | ; CHECK-LABEL: memop_unsigned_int_setbit_index5: |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1484 | ; CHECK: memw(r{{[0-9]+}}{{ *}}+{{ *}}#20){{ *}}={{ *}}setbit({{ *}}#7{{ *}}) |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 1485 | %add.ptr = getelementptr inbounds i32, i32* %p, i32 5 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 1486 | %0 = load i32, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1487 | %or = or i32 %0, 128 |
Manman Ren | a2e9a98 | 2013-08-21 22:20:53 +0000 | [diff] [blame] | 1488 | store i32 %or, i32* %add.ptr, align 4 |
Jyotsna Verma | fdc660b | 2013-03-22 18:41:34 +0000 | [diff] [blame] | 1489 | ret void |
| 1490 | } |