aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ir/abi0.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/ir/abi0.c b/ir/abi0.c
index bd8e297..85f7003 100644
--- a/ir/abi0.c
+++ b/ir/abi0.c
@@ -321,7 +321,6 @@ abi0_call(struct function *fn, struct instr *ins, struct block *blk, int *curi)
}
for (int i = 0; i < nret; ++i) {
struct instr store = {0};
- int iref, iuser;
switch (call->abiret[i].ty.cls) {
default: assert(0);
case KF32: case KI32: store.op = Ostore32; break;
@@ -334,17 +333,7 @@ abi0_call(struct function *fn, struct instr *ins, struct block *blk, int *curi)
store.l = insertinstr(blk, ++*curi, addr);
}
store.r = r[i];
- iuser = insertinstr(blk, ++*curi, store).i;
- if (i > 0) iuser = store.l.i;
- iref = retmem.i;
- if (instrnuse[iref] > 1) {
- /* make this the first use of that temp */
- int last = instrnuse[iref] - 1;
- struct use tmp = instruse[iref][last];
- assert(tmp.blk == blk && tmp.u == iuser);
- memmove(&instruse[iref][last], &instruse[iref][0], (sizeof tmp)*(last));
- instruse[iref][0] = tmp;
- }
+ insertinstr(blk, ++*curi, store);
}
}
}