aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/simplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/simplify.c b/simplify.c
index 90b0c5ba..ee29c961 100644
--- a/simplify.c
+++ b/simplify.c
@@ -1281,6 +1281,22 @@ static int simplify_compare_constant(struct instruction *insn, long long value)
if (value >= (long long)bits)
return replace_with_value(insn, 0);
break;
+ case OP_SET_B:
+ if (value > bits)
+ return replace_with_value(insn, 1);
+ break;
+ case OP_SET_BE:
+ if (value >= bits)
+ return replace_with_value(insn, 1);
+ break;
+ case OP_SET_AE:
+ if (value > bits)
+ return replace_with_value(insn, 0);
+ break;
+ case OP_SET_A:
+ if (value >= bits)
+ return replace_with_value(insn, 0);
+ break;
}
break;
case OP_SEXT: // sext(x) cmp C --> x cmp trunc(C)