Consider the following example conditions/predicates:
x > 10 and x > 20(x > 10 or x == 10) and (x < 10 or x == 10)akax >= 10 and x <= 10
Predicate 1. can be simplified to x > 20 and 2. can be simplified to x == 10. Would a compiler optimize this kind of (or more complex) predicates and if so what algorithms are used to do so?
What are some common optimization techniques for predicates?