+
+ if (ast_istype(expr, ast_unary) && OPTS_OPTIMIZATION(OPTIM_PEEPHOLE)) {
+ ast_unary *prev = (ast_unary*)((ast_unary*)expr)->operand;
+
+ /* Handle for double negation */
+ if ((((ast_unary*)expr)->op == VINSTR_NEG_V && op == VINSTR_NEG_V) ||
+ (((ast_unary*)expr)->op == VINSTR_NEG_F && op == VINSTR_NEG_F)) {
+ prev = (ast_unary*)((ast_unary*)expr)->operand;
+ }
+
+ if (ast_istype(prev, ast_unary)) {
+ ast_expression_delete((ast_expression*)self);
+ mem_d(self);
+ ++opts_optimizationcount[OPTIM_PEEPHOLE];
+ return prev;
+ }
+ }
+