aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/simplify.c
diff options
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/simplify.c b/simplify.c
index 76c05588..15452a58 100644
--- a/simplify.c
+++ b/simplify.c
@@ -1311,13 +1311,11 @@ static int simplify_unop(struct instruction *insn)
struct instruction *def;
case OP_NOT:
- def = insn->src->def;
- if (def && def->opcode == OP_NOT)
+ if (DEF_OPCODE(def, insn->src) == OP_NOT)
return replace_with_pseudo(insn, def->src);
break;
case OP_NEG:
- def = insn->src->def;
- if (def && def->opcode == OP_NEG)
+ if (DEF_OPCODE(def, insn->src) == OP_NEG)
return replace_with_pseudo(insn, def->src);
break;
default: