Commit 0d9e143c by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/78132 (GCC produces invalid instruction (kmovd and kmovq) for KNL.)

	PR rtl-optimization/78132
	* ree.c (combine_reaching_defs): Give up if copy_needed and
	!HARD_REGNO_MODE_OK (REGNO (src_reg), dst_mode).

	* gcc.target/i386/pr78132.c: New test.

From-SVN: r241641
parent 4d925a90
2016-10-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/78132
* ree.c (combine_reaching_defs): Give up if copy_needed and
!HARD_REGNO_MODE_OK (REGNO (src_reg), dst_mode).
2016-10-27 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.md (<*vlop:code><VL:mode>3): Remove leading '*'.
......@@ -788,6 +788,11 @@ combine_reaching_defs (ext_cand *cand, const_rtx set_pat, ext_state *state)
machine_mode dst_mode = GET_MODE (SET_DEST (PATTERN (cand->insn)));
rtx src_reg = get_extended_src_reg (SET_SRC (PATTERN (cand->insn)));
/* Ensure we can use the src_reg in dst_mode (needed for
the (set (reg1) (reg2)) insn mentioned above). */
if (!HARD_REGNO_MODE_OK (REGNO (src_reg), dst_mode))
return false;
/* Ensure the number of hard registers of the copy match. */
if (HARD_REGNO_NREGS (REGNO (src_reg), dst_mode)
!= HARD_REGNO_NREGS (REGNO (src_reg), GET_MODE (src_reg)))
......
2016-10-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/78132
* gcc.target/i386/pr78132.c: New test.
2016-10-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/vect/pr71264.c: XFAIL on SPARC.
......
/* PR rtl-optimization/78132 */
/* { dg-do compile } */
/* { dg-options "-O3 -mavx512f -mno-avx512bw -mno-avx512dq -masm=att" } */
/* { dg-final { scan-assembler-not "kmov\[dq]\t" } } */
unsigned short c;
char a, d, f, b;
short e;
long g;
int
main ()
{
g = c;
f = c & e;
d = c & a | e;
if (a)
b = c;
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment