The problem here is that if tmp had the correct mode, as it usually might, we'd incorrectly discard tmp instead of assigning it to op1.
I see little point in the explicit check vs mode, since convert_to_mode is going to do exactly that first thing. This redundant check is something that should be eliminated elsewhere in the source base too. Tested on x86_64-linux. r~ * config/i386/i386.c (ix86_expand_move): Always assign to op1 after eliminating TLS symbols. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 60f68d4..6dffe14 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1,6 +1,6 @@ /* Subroutines used for code generation on IA-32. - Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 + Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This file is part of GCC. @@ -15960,8 +15960,7 @@ ix86_expand_move (enum machine_mode mode, rtx operands[]) op0, 1, OPTAB_DIRECT); if (tmp == op0) return; - if (GET_MODE (tmp) != mode) - op1 = convert_to_mode (mode, tmp, 1); + op1 = convert_to_mode (mode, tmp, 1); } } -- 1.7.11.7