From: Jakub Jelinek Date: Mon, 2 Oct 2017 18:42:08 +0000 (+0200) Subject: backport: i386.c (ix86_split_idivmod): Use mode instead of always SImode for DIV... X-Git-Tag: releases/gcc-6.5.0~753 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d92b1002bdfeaf3b86a4b2f02cd5adb910f69e5;p=thirdparty%2Fgcc.git backport: i386.c (ix86_split_idivmod): Use mode instead of always SImode for DIV and MOD in REG_EQUAL notes. Backported from mainline 2017-09-30 Jakub Jelinek * config/i386/i386.c (ix86_split_idivmod): Use mode instead of always SImode for DIV and MOD in REG_EQUAL notes. From-SVN: r253363 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4591363a3be8..b9ba2f359f77 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-10-02 Jakub Jelinek + + Backported from mainline + 2017-09-30 Jakub Jelinek + + * config/i386/i386.c (ix86_split_idivmod): Use mode instead of + always SImode for DIV and MOD in REG_EQUAL notes. + 2017-10-02 Bill Schmidt Backport from mainline diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 627091d19a64..2f313bd64646 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -19672,13 +19672,13 @@ ix86_split_idivmod (machine_mode mode, rtx operands[], if (signed_p) { - div = gen_rtx_DIV (SImode, operands[2], operands[3]); - mod = gen_rtx_MOD (SImode, operands[2], operands[3]); + div = gen_rtx_DIV (mode, operands[2], operands[3]); + mod = gen_rtx_MOD (mode, operands[2], operands[3]); } else { - div = gen_rtx_UDIV (SImode, operands[2], operands[3]); - mod = gen_rtx_UMOD (SImode, operands[2], operands[3]); + div = gen_rtx_UDIV (mode, operands[2], operands[3]); + mod = gen_rtx_UMOD (mode, operands[2], operands[3]); } /* Extract remainder from AH. */