aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-11 16:20:12 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:06:01 -0700
commit09b7ad17e4ce5c799a8e317bf51be0f6529949ea (patch)
tree6780cd677fcb29f43c34350a489d6f03fc235ea2 /simplify.c
parentTeach simplification about associative operators. (diff)
downloadsparse-09b7ad17e4ce5c799a8e317bf51be0f6529949ea.tar.gz
sparse-09b7ad17e4ce5c799a8e317bf51be0f6529949ea.tar.bz2
sparse-09b7ad17e4ce5c799a8e317bf51be0f6529949ea.zip
Oops. Didn't remember about BINCMP ops when doing the commutative
work. Equality tests are commutative. The others aren't (well, they need to switch the sense around).
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/simplify.c b/simplify.c
index ebd9eab..e294efb 100644
--- a/simplify.c
+++ b/simplify.c
@@ -711,12 +711,17 @@ int simplify_instruction(struct instruction *insn)
* but we could do it if signed.
*/
case OP_MUL:
+ case OP_SET_EQ: case OP_SET_NE:
if (simplify_binop(insn))
return REPEAT_CSE;
return simplify_commutative_binop(insn);
case OP_SUB: case OP_DIV: case OP_MOD:
case OP_SHL: case OP_SHR:
+ case OP_SET_LE: case OP_SET_GE:
+ case OP_SET_LT: case OP_SET_GT:
+ case OP_SET_B: case OP_SET_A:
+ case OP_SET_BE: case OP_SET_AE:
return simplify_binop(insn);
case OP_NOT: case OP_NEG: