----- Ursprüngliche Mail ----- > On 07/31/2015 12:46 PM, Jakub Jelinek wrote: > > On Fri, Jul 31, 2015 at 06:25:57PM +0200, Kai Tietz wrote: > >> 2015-07-31 18:14 GMT+02:00 Jason Merrill <ja...@redhat.com>: > >>> On 07/30/2015 10:48 PM, Jeff Law wrote: > >>>> > >>>> Note, anything outside of the C/C++ front-ends depending on that > >>>> canonicalization done by shorten_compare is, IMHO, broken. > >>> > >>> I think the OMP code isn't relying on it being done by shorten_compare; > >>> it's > >>> trying to do it itself in c_finish_omp_for but is somehow thwarted by > >>> delayed folding. > >> > >> Well, this seems to be reasoned by finish_omp_for (), which gets > >> invoked in parser.c cp_parser_omp_for_loop, and/or pt.c: tsubst_expr. > >> In all those cases arguments aren't folded anymore. So > >> c_finish_omp_for's patterns don't match anymore. I guess we might > >> want to do this cannonical form in genericize-pass? > > > > Or just fold in finish_omp_for before calling c_finish_omp_for, so that it > > is in the expected form? > > That certainly sounds simpler. > > Jason
Well, it sounds easier. We need to do here this special COND-folding (means operands only), and pass this into c_finish_omp. Of course we should just fold OMP_FOR's COND part. I will try a patch for this- Kai