diff mbox

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

Message ID mvmlgxwv5n7.fsf@hawking.suse.de
State New
Headers show

Commit Message

Andreas Schwab Oct. 10, 2016, 10:51 a.m. UTC
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(+)

Comments

Bernd Schmidt Oct. 10, 2016, 11:01 a.m. UTC | #1
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
diff mbox

Patch

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;