+2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
+ destination register is not odd-even.
+ (umaddsidi4_split): Likewise.
+
2018-10-01 Richard Biener <rguenther@suse.de>
* tree-inline.c (expand_call_inline): Store origin of fn
"{
rtx acc_reg = gen_rtx_REG (DImode, ACC_REG_FIRST);
emit_move_insn (acc_reg, operands[3]);
- if (TARGET_PLUS_MACD)
+ if (TARGET_PLUS_MACD && even_register_operand (operands[0], DImode))
emit_insn (gen_macd (operands[0], operands[1], operands[2]));
else
{
"{
rtx acc_reg = gen_rtx_REG (DImode, ACC_REG_FIRST);
emit_move_insn (acc_reg, operands[3]);
- if (TARGET_PLUS_MACD)
+ if (TARGET_PLUS_MACD && even_register_operand (operands[0], DImode))
emit_insn (gen_macdu (operands[0], operands[1], operands[2]));
else
{
+2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * gcc.target/arc/tmac-3.c: New file.
+
2018-09-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/87359
--- /dev/null
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! { clmcpu } } } */
+/* { dg-options "-mcpu=hs38 -Os" } */
+
+/* The compiler will assign r1r2 as a DI register, but it doesn't fit
+ the macd operation, hence we need to fall back on the mac
+ instruction. */
+typedef long long myint64_t;
+
+extern int d (int, myint64_t);
+int b (int c)
+{
+ int x = (int) d;
+ d (c, (myint64_t)x * 2 + 1);
+}
+
+/* { dg-final { scan-assembler "mac\\\s+r1" } } */