On Thu, 16 Nov 2017, Tamar Christina wrote: > > > > > > > > I see. But then the slow_unaligned_access implementation should use > > > > non_strict_align as default somehow as SLOW_UNALIGNED_ACCESS is > > > > defaulted to STRICT_ALIGN. > > > > > > > > Given that SLOW_UNALIGNED_ACCESS has different values for different > > > > modes it would also make sense to be more specific for the testcase in > > > > question, like word_mode_slow_unaligned_access to tell this only > > > > applies to > > > > word_mode? > > > > > > Ah, that's fair enough. I've updated the patch and the new changelog is: > > > > Did you attach the old patch? I don't see strict_aling being tested in > > the word_mode_np_slow_unalign test. > > > > Sorry! I misunderstood your previous email. I've added the check accordingly.
+ if { ([istarget x86_64-*-*] + || [istarget aarch64*-*-*]) + && [is-effective-target non_strict_align] + } { + set et_word_mode_no_slow_unalign_saved($et_index) 1 + } I'd have made it if { ([is-effective-target non_strict_align] && ! ( [istarget ...] || ....)) thus default it to 1 for non-strict-align targets. > But this also raises a question, some targets have defined > SLOW_UNALIGNED_ACCESS > in a way that uses only internal state to determine the value where > STRICT_ALIGNMENT > is essentially ignored. e.g. PowerPC and riscv. > > The code generation *might* change for them but the tests won't run. I see > now way to > make the test accurate (as in, runs in all cases where the codegen changed) > unless I expose SLOW_UNALIGNED_ACCESS as a define so I can test for it. > > Would this be the way to go? I don't think so. SLOW_UNALIGNED_ACCESS is per mode and specific to a certain alignment. Richard. > Thanks, > Tamar > > > Richard. > > > > > > > > gcc/ > > > 2017-11-15 Tamar Christina <tamar.christ...@arm.com> > > > > > > * expr.c (copy_blkmode_to_reg): Fix bitsize for targets > > > with fast unaligned access. > > > * doc/sourcebuild.texi (word_mode_no_slow_unalign): New. > > > > > > gcc/testsuite/ > > > 2017-11-15 Tamar Christina <tamar.christ...@arm.com> > > > > > > * gcc.dg/struct-simple.c: New. > > > * lib/target-supports.exp > > > (check_effective_target_word_mode_no_slow_unalign): New. > > > > > > Ok for trunk? > > > > > > Thanks, > > > Tamar > > > > > > > > > > > Thanks, > > > > Richard. > > > > > > > > > Thanks, > > > > > Tamar > > > > > > > > > > > > Otherwise the expr.c change looks ok. > > > > > > > > > > > > Thanks, > > > > > > Richard. > > > > > > > > > > > > > Thanks, > > > > > > > Tamar > > > > > > > > > > > > > > > > > > > > > gcc/ > > > > > > > 2017-11-14 Tamar Christina <tamar.christ...@arm.com> > > > > > > > > > > > > > > * expr.c (copy_blkmode_to_reg): Fix bitsize for targets > > > > > > > with fast unaligned access. > > > > > > > * doc/sourcebuild.texi (no_slow_unalign): New. > > > > > > > > > > > > > > gcc/testsuite/ > > > > > > > 2017-11-14 Tamar Christina <tamar.christ...@arm.com> > > > > > > > > > > > > > > * gcc.dg/struct-simple.c: New. > > > > > > > * lib/target-supports.exp > > > > > > > (check_effective_target_no_slow_unalign): New. > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Richard Biener <rguent...@suse.de> > > > > > > SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham > > > > > > Norton, HRB 21284 (AG Nuernberg) > > > > > > > > > > > > > > > > > > -- > > > > Richard Biener <rguent...@suse.de> > > > > SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, > > > > HRB 21284 (AG Nuernberg) > > > > > > > -- > > Richard Biener <rguent...@suse.de> > > SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB > > 21284 (AG Nuernberg) > > -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)