aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-03-20 15:44:01 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2021-04-17 20:43:15 +0200
commit3de14a1edba826afa66840798ec260ec60f6ed49 (patch)
treed3639daa87c45bbe0156a4a99c6fdb853fb0a6c2
parente016f0beb9bdbf87e5acabcd475b797c2fff4608 (diff)
downloadsparse-3de14a1edba826afa66840798ec260ec60f6ed49.tar.gz
memops: do not mess up with phisource's source ident
In rewrite_load_instruction(), when testing if all phi-sources are the same, the candidate is given an identifier if it hasn't one already. But doing this inside this loop is strange: * the pseudo may, at the end, not be selected but is changed anyway * the identifier should be given either when the phi-source is created or at the end of the loop if selected. So, do not change the identifier inside the selection loop. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--memops.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/memops.c b/memops.c
index d8f06e19..d1a9b660 100644
--- a/memops.c
+++ b/memops.c
@@ -29,7 +29,6 @@ static void rewrite_load_instruction(struct instruction *insn, struct pseudo_lis
FOR_EACH_PTR(dominators, phi) {
if (new != phi->def->phi_src)
goto complex_phi;
- new->ident = new->ident ? : phi->ident;
} END_FOR_EACH_PTR(phi);
/*