From 65ceed36018fcc227a90fee38ee07cd935c53b64 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 26 Jul 2011 21:43:57 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/i386.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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; } -- 2.30.2