Message ID | 20240526003957.786729-1-pan2.li@intel.com |
---|---|
State | New |
Headers | show |
Series | [v1] Gen-Match: Fix gen_kids_1 right hand braces mis-alignment | expand |
On 5/25/24 6:39 PM, pan2.li@intel.com wrote: > From: Pan Li <pan2.li@intel.com> > > Notice some mis-alignment for gen_kids_1 right hand braces as below: > > if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (... > { > if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (... > { > { > tree captures[2] ATTRIBUTE_UNUSED = {... > { > res_ops[0] = captures[0]; > res_ops[1] = captures[1]; > if (UNLIKELY (debug_dump)) ... > return true; > } > } > } > } > } // mis-aligned here. > } > > The below test are passed for this patch: > * The x86 bootstrap test. > * The x86 fully regression test. > > gcc/ChangeLog: > > * genmatch.cc (dt_node::gen_kids_1): Fix indenet mis-aligned. OK Thanks. jeff
Committed, thanks Jeff. Pan -----Original Message----- From: Jeff Law <jeffreyalaw@gmail.com> Sent: Sunday, May 26, 2024 9:59 PM To: Li, Pan2 <pan2.li@intel.com>; gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai; kito.cheng@gmail.com; richard.guenther@gmail.com Subject: Re: [PATCH v1] Gen-Match: Fix gen_kids_1 right hand braces mis-alignment On 5/25/24 6:39 PM, pan2.li@intel.com wrote: > From: Pan Li <pan2.li@intel.com> > > Notice some mis-alignment for gen_kids_1 right hand braces as below: > > if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (... > { > if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (... > { > { > tree captures[2] ATTRIBUTE_UNUSED = {... > { > res_ops[0] = captures[0]; > res_ops[1] = captures[1]; > if (UNLIKELY (debug_dump)) ... > return true; > } > } > } > } > } // mis-aligned here. > } > > The below test are passed for this patch: > * The x86 bootstrap test. > * The x86 fully regression test. > > gcc/ChangeLog: > > * genmatch.cc (dt_node::gen_kids_1): Fix indenet mis-aligned. OK Thanks. jeff
diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index c982c95b70f..f1e0e7abe0c 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -3428,7 +3428,7 @@ dt_node::gen_kids_1 (FILE *f, int indent, bool gimple, int depth, child_opname, kid_opname, j); } preds[i]->gen_kids (f, indent + 4, gimple, depth); - fprintf (f, "}\n"); + fprintf_indent (f, indent, " }\n"); indent -= 2; fprintf_indent (f, indent, "}\n"); }