+2016-12-07 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/78691
+ * match.pd ((convert1 (minmax ((convert2 (x) c)))) -> minmax (x c)):
+ Require integral type for the outer expression.
+
2016-12-07 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
* config/aarch64/aarch64.c
(for minmax (min max)
(simplify
(convert (minmax@0 (convert @1) INTEGER_CST@2))
- (if (types_match (@1, type) && int_fits_type_p (@2, type)
+ (if (INTEGRAL_TYPE_P (type)
+ && types_match (@1, type) && int_fits_type_p (@2, type)
&& TYPE_SIGN (TREE_TYPE (@0)) == TYPE_SIGN (type)
&& TYPE_PRECISION (TREE_TYPE (@0)) > TYPE_PRECISION (type))
(minmax @1 (convert @2)))))
+2016-12-07 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/78691
+ * gcc.target/i386/pr78691-i386.c: New test.
+ * gcc.target/powerpc/pr78691-ppc.c: New test.
+
2016-12-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc.target/i386/pr70322-1.c: Add -mno-stackrealign to dg-options.
--- /dev/null
+/* PR tree-optimization/78691 */
+/* { dg-options "-Os -m16" } */
+
+int fn1(char *p1, char *p2) {
+ int a;
+ for (;;)
+ switch (*p2) {
+ case 'c':
+ while (--a > 0)
+ *p1++ = ' ';
+ p1++;
+ a--;
+ }
+}
--- /dev/null
+/* PR tree-optimization/78691 */
+/* { dg-options "-Os -m32" } */
+
+int *b;
+int fn1() {
+ char *c;
+ int a;
+ for (;;)
+ switch (*b) {
+ case 'c':
+ while (--a > 0)
+ *c++ = ' ';
+ c++;
+ if (a)
+ a = sizeof(void *);
+ }
+}
+