mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
fix a bad bug in copy detection
The code used to see add 0, 10 as a copy of 0.
This commit is contained in:
parent
6130985274
commit
1b1a7f618c
4
copy.c
4
copy.c
@ -27,11 +27,11 @@ iscopy(Ins *i, Ref r, Fn *fn)
|
||||
case Ocopy:
|
||||
return 1;
|
||||
case Omul:
|
||||
return iscon(i->arg[0], 1, fn) || iscon(i->arg[1], 1, fn);
|
||||
return iscon(i->arg[1], 1, fn);
|
||||
case Odiv:
|
||||
return iscon(i->arg[1], 1, fn);
|
||||
case Oadd:
|
||||
return iscon(i->arg[0], 0, fn) || iscon(i->arg[1], 0, fn);
|
||||
return iscon(i->arg[1], 0, fn);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user