Commit a8264058 by Segher Boessenkool Committed by Segher Boessenkool

rs6000: Fix split of ashdi3_extswsli_dot for memory (PR71670)

The splitter for ashdi3_extswsli_dot for cr0 with memory uses emit_insn
gen_ashdi3_extswsli_dot, which does not work because that emits a scratch,
while the splitter runs after reload so there should be a real register
instead.  We can laboriously fix that up, or emit using
gen_ashdi3_extswsli_dot2 instead.  This patch does the latter.


	PR target/71670
	* config/rs6000/rs6000.md (ashdi3_extswsli_dot): Use
	gen_ashdi3_extswsli_dot2 instead of gen_ashdi3_extswsli_dot.

gcc/testsuite/
	PR target/71670
	* gcc.target/powerpc/pr71670.c: New testcase.

From-SVN: r237813
parent 7c788ce2
2016-06-27 Segher Boessenkool <segher@kernel.crashing.org>
PR target/71670
* config/rs6000/rs6000.md (ashdi3_extswsli_dot): Use
gen_ashdi3_extswsli_dot2 instead of gen_ashdi3_extswsli_dot.
2016-06-27 Pat Haugen <pthaugen@us.ibm.com>
* config/rs6000/rs6000.md ('type' attribute): Add
......
......@@ -4094,7 +4094,7 @@
if (REGNO (cr) == CR0_REGNO)
{
emit_insn (gen_ashdi3_extswsli_dot (dest, src2, shift, cr));
emit_insn (gen_ashdi3_extswsli_dot2 (dest, src2, shift, cr));
DONE;
}
......
2016-06-27 Segher Boessenkool <segher@kernel.crashing.org>
PR target/71670
* gcc.target/powerpc/pr71670.c: New testcase.
2016-06-27 Peter Bergner <bergner@vnet.ibm.com>
PR target/71656
......
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
/* { dg-options "-mcpu=power9 -O1" } */
volatile int a;
int b;
void fn1(void) { b + (long)b || a; }
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