2010-04-20 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/43438
* combine.c (make_extraction): Properly zero-/sign-extend an
extraction of the low part of a CONST_INT.
* gcc.c-torture/execute/pr43438.c: New testcase.
From-SVN: r158555
+2010-04-20 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/43438
+ * combine.c (make_extraction): Properly zero-/sign-extend an
+ extraction of the low part of a CONST_INT.
+
2010-04-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43629
return new;
if (GET_CODE (new) == CONST_INT)
- return gen_int_mode (INTVAL (new), mode);
+ return simplify_unary_operation (unsignedp ? ZERO_EXTEND : SIGN_EXTEND,
+ mode, new, tmode);
/* If we know that no extraneous bits are set, and that the high
bit is not set, convert the extraction to the cheaper of
+2010-04-20 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/43438
+ * gcc.c-torture/execute/pr43438.c: New testcase.
+
2010-04-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43629
--- /dev/null
+extern void abort (void);
+
+static unsigned char g_2 = 1;
+static int g_9;
+static int *l_8 = &g_9;
+
+static void func_12(int p_13)
+{
+ int * l_17 = &g_9;
+ *l_17 &= 0 < p_13;
+}
+
+int main(void)
+{
+ unsigned char l_11 = 254;
+ *l_8 |= g_2;
+ l_11 |= *l_8;
+ func_12(l_11);
+ if (g_9 != 1)
+ abort ();
+ return 0;
+}
+