Re: Fix invalid doloop setup on ia64 (PR target/77738)

2016-10-10 Thread Bernd Schmidt

On 10/10/2016 12:51 PM, Andreas Schwab wrote:

On ia64 the doloop pattern can only work with DImode, so it should
reject any other mode.  Bootstrapped and regtested on ia64-suse-linux.

Andreas.

PR target/77738
* config/ia64/ia64.md ("doloop_end"): Reject if mode of loop
pseudo is not DImode.


Ok. Same issue as on every target that uses doloop.


Bernd



Fix invalid doloop setup on ia64 (PR target/77738)

2016-10-10 Thread Andreas Schwab
On ia64 the doloop pattern can only work with DImode, so it should
reject any other mode.  Bootstrapped and regtested on ia64-suse-linux.

Andreas.

PR target/77738
* config/ia64/ia64.md ("doloop_end"): Reject if mode of loop
pseudo is not DImode.

---
 gcc/config/ia64/ia64.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md
index 7bc21fd8ca..afde75aa74 100644
--- a/gcc/config/ia64/ia64.md
+++ b/gcc/config/ia64/ia64.md
@@ -3959,6 +3959,9 @@
(use (match_operand 1 "" ""))]  ; label
   ""
 {
+  if (GET_MODE (operands[0]) != DImode)
+FAIL;
+
   emit_jump_insn (gen_doloop_end_internal (gen_rtx_REG (DImode, AR_LC_REGNUM),
   operands[1]));
   DONE;
-- 
2.10.1

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."