PR debug/64817
* simplify-rtx.c (simplify_binary_operation_1): Use ~cval for
IOR rather than for AND.
* gcc.c-torture/execute/pr64957.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220475
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/64957
+ PR debug/64817
+ * simplify-rtx.c (simplify_binary_operation_1): Use ~cval for
+ IOR rather than for AND.
+
2015-02-06 Eric Botcazou <ebotcazou@adacore.com>
PR target/62631
HOST_WIDE_INT xcval;
if (op == IOR)
- xcval = cval;
- else
xcval = ~cval;
+ else
+ xcval = cval;
return simplify_gen_binary (XOR, mode,
simplify_gen_binary (op, mode, a, c),
+2015-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/64957
+ PR debug/64817
+ * gcc.c-torture/execute/pr64957.c: New test.
+
2015-02-05 Jeff Law <law@redhat.com>
PR target/17306
--- /dev/null
+/* PR rtl-optimization/64957 */
+
+__attribute__((noinline, noclone)) int
+foo (int b)
+{
+ return (((b ^ 5) | 1) ^ 5) | 1;
+}
+
+__attribute__((noinline, noclone)) int
+bar (int b)
+{
+ return (((b ^ ~5) & ~1) ^ ~5) & ~1;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ if (foo (i) != (i | 1) || bar (i) != (i & ~1))
+ __builtin_abort ();
+ return 0;
+}