diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-07-27 00:23:32 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-07-27 00:23:32 +0200 |
commit | 9980026aa50cd1b0971d217575a77e92834b3fc1 (patch) | |
tree | 23703ff0b44b66868846f3d8a0f68481469e0e8e | |
parent | 8af2432923486c753ab52cae70b94ee684121080 (diff) | |
download | sparse-9980026aa50cd1b0971d217575a77e92834b3fc1.tar.gz |
fix missing itype in SEL(x, 0/1, 1/0) --> (x ==/!= 0)
Since commit 226b62bc2ee4 ("eval_insn: give an explicit type to compare's operands")
it's needed to set the operands' type of every compare instructions but
it was missing in this case where a select is transformed into a compare.
So, add the missing type.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | simplify.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2449,6 +2449,7 @@ static int simplify_select(struct instruction *insn) opcode = OP_SET_NE; } insn->opcode = opcode; + insn->itype = insn->type; /* insn->src1 is already cond */ insn->src2 = src1; /* Zero */ return REPEAT_CSE; |