+2016-12-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/70322
+ * config/i386/i386.c (dimode_scalar_to_vector_candidate_p): Handle NEG.
+ (dimode_scalar_chain::compute_convert_gain): Ditto.
+ (dimode_scalar_chain::convert_insn): Ditto.
+
2016-12-03 Eric Botcazou <ebotcazou@adacore.com>
* lra-constraints.c (emit_spill_move): Use gen_lowpart_SUBREG in all
cases to build a lowpart SUBREG.
2016-12-03 Eric Botcazou <ebotcazou@adacore.com>
- David S. Miller <davem@davemloft.net>
+ David S. Miller <davem@davemloft.net>
* config/sparc/constraints.md (U): Adjust comment.
* config/sparc/sparc.md (lra): New attribute.
return false;
break;
+ case NEG:
case NOT:
break;
if ((GET_MODE (XEXP (src, 0)) != DImode
&& !CONST_INT_P (XEXP (src, 0)))
- || (GET_CODE (src) != NOT
+ || (GET_CODE (src) != NEG
+ && GET_CODE (src) != NOT
&& GET_MODE (XEXP (src, 1)) != DImode
&& !CONST_INT_P (XEXP (src, 1))))
return false;
if (CONST_INT_P (XEXP (src, 1)))
gain -= vector_const_cost (XEXP (src, 1));
}
- else if (GET_CODE (src) == NOT)
+ else if (GET_CODE (src) == NEG
+ || GET_CODE (src) == NOT)
gain += ix86_cost->add - COSTS_N_INSNS (1);
else if (GET_CODE (src) == COMPARE)
{
PUT_MODE (src, V2DImode);
break;
+ case NEG:
+ src = XEXP (src, 0);
+ convert_op (&src, insn);
+ subreg = gen_reg_rtx (V2DImode);
+ emit_insn_before (gen_move_insn (subreg, CONST0_RTX (V2DImode)), insn);
+ src = gen_rtx_MINUS (V2DImode, subreg, src);
+ break;
+
case NOT:
src = XEXP (src, 0);
convert_op (&src, insn);
--- /dev/null
+/* PR target/70322 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -msse2 -mstv" } */
+/* { dg-final { scan-assembler "psub" } } */
+/* { dg-final { scan-assembler "por" } } */
+
+extern long long z;
+
+void
+foo (long long x, long long y)
+{
+ z = -x | y;
+}