+2014-09-10 Xinliang David Li <davidxl@google.com>
+
+ PR target/63209
+ * config/arm/arm.md (movcond_addsi): Handle case where source
+ and target operands are the same.
+
2014-09-10 David Malcolm <dmalcolm@redhat.com>
* final.c (this_is_asm_operands): Strengthen this variable from
enum machine_mode mode = SELECT_CC_MODE (GET_CODE (operands[5]),
operands[3], operands[4]);
enum rtx_code rc = GET_CODE (operands[5]);
-
operands[6] = gen_rtx_REG (mode, CC_REGNUM);
gcc_assert (!(mode == CCFPmode || mode == CCFPEmode));
- rc = reverse_condition (rc);
+ if (REGNO (operands[2]) != REGNO (operands[0]))
+ rc = reverse_condition (rc);
+ else
+ {
+ rtx tmp = operands[1];
+ operands[1] = operands[2];
+ operands[2] = tmp;
+ }
operands[6] = gen_rtx_fmt_ee (rc, VOIDmode, operands[6], const0_rtx);
}
+2014-09-10 Xinliang David Li <davidxl@google.com>
+
+ PR target/63209
+ * gcc.c-torture/execute/pr63209.c: New test.
+
2014-09-10 Jakub Jelinek <jakub@redhat.com>
* gcc.target/i386/i386.exp: Only run vect-args.c tests
--- /dev/null
+static int Sub(int a, int b) {
+ return b -a;
+}
+
+static unsigned Select(unsigned a, unsigned b, unsigned c) {
+ const int pa_minus_pb =
+ Sub((a >> 8) & 0xff, (b >> 8) & 0xff) +
+ Sub((a >> 0) & 0xff, (b >> 0) & 0xff);
+ return (pa_minus_pb <= 0) ? a : b;
+}
+
+__attribute__((noinline)) unsigned Predictor(unsigned left, const unsigned* const top) {
+ const unsigned pred = Select(top[1], left, top[0]);
+ return pred;
+}
+
+int main(void) {
+ const unsigned top[2] = {0xff7a7a7a, 0xff7a7a7a};
+ const unsigned left = 0xff7b7b7b;
+ const unsigned pred = Predictor(left, top /*+ 1*/);
+ if (pred == left)
+ return 0;
+ return 1;
+}
+
+
+