From: H.J. Lu Date: Tue, 26 Jul 2011 21:43:57 +0000 (+0000) Subject: Call simplify_gen_subreg for PIC with mode of x. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65ceed36018fcc227a90fee38ee07cd935c53b64;p=gcc.git Call simplify_gen_subreg for PIC with mode of x. 2011-07-26 H.J. Lu PR target/47372 * config/i386/i386.c (ix86_delegitimize_address): Call simplify_gen_subreg for PIC with mode of x only if modes of x and orig_x are different. From-SVN: r176812 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 08fb66517be..b93f220835c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-07-26 H.J. Lu + + PR target/47372 + * config/i386/i386.c (ix86_delegitimize_address): Call + simplify_gen_subreg for PIC with mode of x only if modes of + x and orig_x are different. + 2011-07-26 Jakub Jelinek * dwarf2out.c (output_macinfo_op): Ensure fd->filename points diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 429cd6271ca..960622a155e 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -12967,9 +12967,10 @@ ix86_delegitimize_address (rtx x) || !MEM_P (orig_x)) return ix86_delegitimize_tls_address (orig_x); x = XVECEXP (XEXP (x, 0), 0, 0); - if (GET_MODE (orig_x) != Pmode) + if (GET_MODE (orig_x) != GET_MODE (x)) { - x = simplify_gen_subreg (GET_MODE (orig_x), x, Pmode, 0); + x = simplify_gen_subreg (GET_MODE (orig_x), x, + GET_MODE (x), 0); if (x == NULL_RTX) return orig_x; }