2016-06-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/71311
* match.pd (@0 < @1 && @0 < @2 -> @0 < min(@1,@2)): Add :c and
restrict to non-INTEGER_CST @0.
From-SVN: r236980
+2016-06-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/71311
+ * match.pd (@0 < @1 && @0 < @2 -> @0 < min(@1,@2)): Add :c and
+ restrict to non-INTEGER_CST @0.
+
2016-06-01 Richard Biener <rguenther@suse.de>
* match.pd ((A & B) - (A & ~B) -> B - (A ^ B)): Add missing :c.
(for op (lt le gt ge)
ext (min min max max)
(simplify
- (bit_and (op:s @0 @1) (op:s @0 @2))
- (if (INTEGRAL_TYPE_P (TREE_TYPE (@0)))
+ (bit_and (op:cs @0 @1) (op:cs @0 @2))
+ (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
+ && TREE_CODE (@0) != INTEGER_CST)
(op @0 (ext @1 @2)))))
(simplify