On 16/08/18 21:16, Luc Van Oostenryck wrote: > For the simplification of ((x << S) > S), we can use the fact s/) > S)/) >> S)/ ATB, Ramsay Jones > there is a single PSEUDO_VAL for each value to simplifiy the > check guarding the simplification. > > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> > --- > simplify.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/simplify.c b/simplify.c > index ef98b205a..0720070a8 100644 > --- a/simplify.c > +++ b/simplify.c > @@ -673,9 +673,7 @@ static int simplify_shift(struct instruction *insn, pseudo_t pseudo, long long v > case OP_SHL: > // replace (A << S) >> S > // by A & (Mask(size) >> S) > - if (!constant(def->src2)) > - break; > - if (def->src2->value != value) > + if (def->src2 != insn->src2) > break; > size = insn->size - value; > insn->opcode = OP_AND; >