Re: PR middle-end/51472: set DECL_GIMPLE_REG_P on TM vector saves

2011-12-21 Thread Jakub Jelinek
On Wed, Dec 21, 2011 at 08:15:38AM -0600, Aldy Hernandez wrote: > >The first hunk looks okay. > > Was that an approval? Updated patch attached. Yes. Thanks. Jakub

Re: PR middle-end/51472: set DECL_GIMPLE_REG_P on TM vector saves

2011-12-21 Thread Aldy Hernandez
On 12/21/11 08:07, Jakub Jelinek wrote: On Wed, Dec 21, 2011 at 07:52:16AM -0600, Aldy Hernandez wrote: Oh neat... create_tmp_reg will do all this for me. I don't think that update_stmt is needed there. The stmt is freshly allocated a few lines above it: stmt = gimple_build_assign (lp-

Re: PR middle-end/51472: set DECL_GIMPLE_REG_P on TM vector saves

2011-12-21 Thread Jakub Jelinek
On Wed, Dec 21, 2011 at 07:52:16AM -0600, Aldy Hernandez wrote: > Oh neat... create_tmp_reg will do all this for me. I don't think that update_stmt is needed there. The stmt is freshly allocated a few lines above it: stmt = gimple_build_assign (lp->save_var, unshare_expr (lp->addr)); so th

Re: PR middle-end/51472: set DECL_GIMPLE_REG_P on TM vector saves

2011-12-21 Thread Aldy Hernandez
You can't simply do + if (TREE_CODE (TREE_TYPE (var)) == COMPLEX_TYPE + || TREE_CODE (TREE_TYPE (var)) == VECTOR_TYPE) + DECL_GIMPLE_REG_P (var) = 1; + update_stmt (stmt); where is 'var' created? At _that_ point you should do the above (or use create_tmp_

Re: PR middle-end/51472: set DECL_GIMPLE_REG_P on TM vector saves

2011-12-21 Thread Richard Guenther
On Tue, Dec 20, 2011 at 5:57 PM, Aldy Hernandez wrote: > The problem here is a verify_gimple ICE because a vector store's LHS is not > a gimple register, but the vector type is a gimple_reg_type. > >     if (!is_gimple_reg (lhs) >          && is_gimple_reg_type (TREE_TYPE (lhs))) >        { >    

PR middle-end/51472: set DECL_GIMPLE_REG_P on TM vector saves

2011-12-20 Thread Aldy Hernandez
The problem here is a verify_gimple ICE because a vector store's LHS is not a gimple register, but the vector type is a gimple_reg_type. if (!is_gimple_reg (lhs) && is_gimple_reg_type (TREE_TYPE (lhs))) { error ("invalid rhs for gimple memory store"); d