Skip to content

Commit 57b7ee9

Browse files
fix some broken comparisons, this affected the Pattern isel too.
llvm-svn: 24109
1 parent 48131a8 commit 57b7ee9

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

llvm/lib/Target/IA64/IA64InstrInfo.td

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -257,29 +257,6 @@ def SHRS : AForm_DAG<0x03, 0x0b, (ops GR:$dst, GR:$src1, GR:$src2),
257257
"shr $dst = $src1, $src2;;",
258258
[(set GR:$dst, (sra GR:$src1, GR:$src2))]>;
259259

260-
/*
261-
def CMPEQ : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
262-
"cmp.eq $dst, p0 = $src1, $src2;;">;
263-
def CMPGT : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
264-
"cmp.gt $dst, p0 = $src1, $src2;;">;
265-
def CMPGE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
266-
"cmp.ge $dst, p0 = $src1, $src2;;">;
267-
def CMPLT : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
268-
"cmp.lt $dst, p0 = $src1, $src2;;">;
269-
def CMPLE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
270-
"cmp.le $dst, p0 = $src1, $src2;;">;
271-
def CMPNE : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
272-
"cmp.ne $dst, p0 = $src1, $src2;;">;
273-
def CMPLTU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
274-
"cmp.ltu $dst, p0 = $src1, $src2;;">;
275-
def CMPGTU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
276-
"cmp.gtu $dst, p0 = $src1, $src2;;">;
277-
def CMPLEU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
278-
"cmp.leu $dst, p0 = $src1, $src2;;">;
279-
def CMPGEU : AForm<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
280-
"cmp.geu $dst, p0 = $src1, $src2;;">;
281-
*/
282-
283260
// the following are all a bit unfortunate: we throw away the complement
284261
// of the compare!
285262
def CMPEQ : AForm_DAG<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
@@ -301,16 +278,16 @@ def CMPNE : AForm_DAG<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
301278
"cmp.ne $dst, p0 = $src1, $src2;;",
302279
[(set PR:$dst, (setne GR:$src1, GR:$src2))]>;
303280
def CMPLTU: AForm_DAG<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
304-
"cmp.eq $dst, p0 = $src1, $src2;;",
281+
"cmp.ltu $dst, p0 = $src1, $src2;;",
305282
[(set PR:$dst, (setult GR:$src1, GR:$src2))]>;
306283
def CMPGTU: AForm_DAG<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
307-
"cmp.eq $dst, p0 = $src1, $src2;;",
284+
"cmp.gtu $dst, p0 = $src1, $src2;;",
308285
[(set PR:$dst, (setugt GR:$src1, GR:$src2))]>;
309286
def CMPLEU: AForm_DAG<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
310-
"cmp.eq $dst, p0 = $src1, $src2;;",
287+
"cmp.leu $dst, p0 = $src1, $src2;;",
311288
[(set PR:$dst, (setule GR:$src1, GR:$src2))]>;
312289
def CMPGEU: AForm_DAG<0x03, 0x0b, (ops PR:$dst, GR:$src1, GR:$src2),
313-
"cmp.eq $dst, p0 = $src1, $src2;;",
290+
"cmp.geu $dst, p0 = $src1, $src2;;",
314291
[(set PR:$dst, (setuge GR:$src1, GR:$src2))]>;
315292

316293
// TODO: support postincrement (reg, imm9) loads+stores - this needs more

0 commit comments

Comments
 (0)