llvm.org GIT mirror llvm / bc5962a
[mips] not instruction alias This patch adds the single operand form of the not alias to microMIPS and MIPS along with additional tests. This partially resolves PR/30381. Thanks to Sean Bruno for reporting the issue! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287097 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Dardis 2 years ago
20 changed file(s) with 38 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11761176 (XORi_MM GPR32Opnd:$rs, GPR32Opnd:$rs, uimm16:$imm), 0>;
11771177 def : MipsInstAlias<"not $rt, $rs",
11781178 (NOR_MM GPR32Opnd:$rt, GPR32Opnd:$rs, ZERO), 0>;
1179 def : MipsInstAlias<"not $rt",
1180 (NOR_MM GPR32Opnd:$rt, GPR32Opnd:$rt, ZERO), 0>;
11791181 def : MipsInstAlias<"bnez $rs,$offset",
11801182 (BNE_MM GPR32Opnd:$rs, ZERO, brtarget:$offset), 0>;
11811183 def : MipsInstAlias<"beqz $rs,$offset",
23472347 def : MipsInstAlias<
23482348 "not $rt, $rs",
23492349 (NOR GPR32Opnd:$rt, GPR32Opnd:$rs, ZERO), 0>;
2350 def : MipsInstAlias<
2351 "not $rt",
2352 (NOR GPR32Opnd:$rt, GPR32Opnd:$rt, ZERO), 0>;
23502353 def : MipsInstAlias<"nop", (SLL ZERO, ZERO, 0), 1>;
23512354 }
23522355 def : MipsInstAlias<"mfc0 $rt, $rd", (MFC0 GPR32Opnd:$rt, COP0Opnd:$rd, 0), 0>;
7373 xori $9, $6, 17767 # CHECK: xori $9, $6, 17767 # encoding: [0x71,0x26,0x45,0x67]
7474 nor $9, $6, $7 # CHECK: nor $9, $6, $7 # encoding: [0x00,0xe6,0x4a,0xd0]
7575 not $7, $8 # CHECK: not $7, $8 # encoding: [0x00,0x08,0x3a,0xd0]
76 not $7 # CHECK: not $7, $7 # encoding: [0x00,0x07,0x3a,0xd0]
7677 mul $9, $6, $7 # CHECK: mul $9, $6, $7 # encoding: [0x00,0xe6,0x4a,0x10]
7778 mult $9, $7 # CHECK: mult $9, $7 # encoding: [0x00,0xe9,0x8b,0x3c]
7879 multu $9, $7 # CHECK: multu $9, $7 # encoding: [0x00,0xe9,0x9b,0x3c]
358358 and $3, 5 # CHECK: andi $3, $3, 5 # encoding: [0xd0,0x63,0x00,0x05]
359359 and $3, $4, 5 # CHECK: andi $3, $4, 5 # encoding: [0xd0,0x64,0x00,0x05]
360360 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x04,0x1a,0xd0]
361 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x03,0x1a,0xd0]
361362 or $3, 5 # CHECK: ori $3, $3, 5 # encoding: [0x50,0x63,0x00,0x05]
362363 or $3, $4, 5 # CHECK: ori $3, $4, 5 # encoding: [0x50,0x64,0x00,0x05]
363364 xor $3, 5 # CHECK: xori $3, $3, 5 # encoding: [0x70,0x63,0x00,0x05]
292292 andi $3, $4, 1234 # CHECK: andi $3, $4, 1234 # encoding: [0xd0,0x64,0x04,0xd2]
293293 nor $3, $4, $5 # CHECK: nor $3, $4, $5 # encoding: [0x00,0xa4,0x1a,0xd0]
294294 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x04,0x1a,0xd0]
295 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x03,0x1a,0xd0]
295296 or $3, 5 # CHECK: ori $3, $3, 5 # encoding: [0x50,0x63,0x00,0x05]
296297 or $3, $4, 5 # CHECK: ori $3, $4, 5 # encoding: [0x50,0x64,0x00,0x05]
297298 or $3, $4, $5 # CHECK: or $3, $4, $5 # encoding: [0x00,0xa4,0x1a,0x90]
8484 neg.s $f1,$f15
8585 nop
8686 nor $a3,$zero,$a3
87 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
88 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
8789 or $12,$s0,$sp
8890 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
8991 sb $s6,-19857($14)
106106 neg.s $f1,$f15
107107 nop
108108 nor $a3,$zero,$a3
109 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
110 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
109111 or $12,$s0,$sp
110112 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
111113 round.w.d $f6,$f4
166166 neg.s $f1,$f15
167167 nop
168168 nor $a3,$zero,$a3
169 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
170 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
169171 or $12,$s0,$sp
170172 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
171173 round.l.d $f12,$f1
134134 neg.s $f1,$f15
135135 nop
136136 nor $a3,$zero,$a3
137 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
138 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
137139 or $12,$s0,$sp
138140 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
139141 pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
156156 nmsub.s $f1,$f24,$f19,$f4
157157 nop
158158 nor $a3,$zero,$a3
159 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
160 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
159161 or $12,$s0,$sp
160162 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
161163 pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
156156 nmsub.s $f1,$f24,$f19,$f4
157157 nop
158158 nor $a3,$zero,$a3
159 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
160 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
159161 or $12,$s0,$sp
160162 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
161163 pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
157157 nmsub.s $f1,$f24,$f19,$f4
158158 nop
159159 nor $a3,$zero,$a3
160 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
161 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
160162 or $12,$s0,$sp
161163 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
162164 pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
135135 neg $2, $3 # CHECK: neg $2, $3 # encoding: [0x00,0x03,0x10,0x22]
136136 negu $2 # CHECK: negu $2, $2 # encoding: [0x00,0x02,0x10,0x23]
137137 negu $2,$3 # CHECK: negu $2, $3 # encoding: [0x00,0x03,0x10,0x23]
138 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
139 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
138140 pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0x7c,0xa1,0x04,0x35]
139141 # FIXME: Use the code generator in order to print the .set directives
140142 # instead of the instruction printer.
192192 nmsub.s $f0, $f24, $f20, $f4 # encoding: [0x4f,0x04,0xa0,0x38]
193193 nop
194194 nor $a3,$zero,$a3
195 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
196 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
195197 or $12,$s0,$sp
196198 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
197199 pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
193193 nmsub.s $f0, $f24, $f20, $f4 # encoding: [0x4f,0x04,0xa0,0x38]
194194 nop
195195 nor $a3,$zero,$a3
196 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
197 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
196198 or $12,$s0,$sp
197199 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
198200 pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
209209 nmsub.s $f0, $f24, $f20, $f4 # encoding: [0x4f,0x04,0xa0,0x38]
210210 nop
211211 nor $a3,$zero,$a3
212 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
213 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
212214 or $12,$s0,$sp
213215 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
214216 pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0xcc,0xa1,0x00,0x08]
223223 nmsub.s $f1,$f24,$f19,$f4
224224 nop
225225 nor $a3,$zero,$a3
226 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
227 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
226228 or $12,$s0,$sp
227229 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
228230 pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
223223 nmsub.s $f1,$f24,$f19,$f4
224224 nop
225225 nor $a3,$zero,$a3
226 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
227 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
226228 or $12,$s0,$sp
227229 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
228230 pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
224224 nmsub.s $f1,$f24,$f19,$f4
225225 nop
226226 nor $a3,$zero,$a3
227 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
228 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
227229 or $12,$s0,$sp
228230 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
229231 pause # CHECK: pause # encoding: [0x00,0x00,0x01,0x40]
189189 neg $2, $3 # CHECK: neg $2, $3 # encoding: [0x00,0x03,0x10,0x22]
190190 negu $2 # CHECK: negu $2, $2 # encoding: [0x00,0x02,0x10,0x23]
191191 negu $2,$3 # CHECK: negu $2, $3 # encoding: [0x00,0x03,0x10,0x23]
192 not $3, $4 # CHECK: not $3, $4 # encoding: [0x00,0x80,0x18,0x27]
193 not $3 # CHECK: not $3, $3 # encoding: [0x00,0x60,0x18,0x27]
192194 or $2, 4 # CHECK: ori $2, $2, 4 # encoding: [0x34,0x42,0x00,0x04]
193195 pref 1, 8($5) # CHECK: pref 1, 8($5) # encoding: [0x7c,0xa1,0x04,0x35]
194196 # FIXME: Use the code generator in order to print the .set directives