Message ID | 131cf136-c826-3639-1636-3ce186346de1@redhat.com |
---|---|
State | New |
Headers | show |
Hi Vladimir, On 17 January 2017 at 17:14, Vladimir Makarov <vmakarov@redhat.com> wrote: > The following patch fixes > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058 > > The patch was successfully bootstrapped and tested on x86-64. > > Committed as rev. 244535. > > The new testcase fails to compile on arm*-linux-gnueabihf configurations when using -mthumb (either via runtestflags or configuring gcc --with-mode=thumb) because "sorry, unimplemented: Thumb-1 hard-float VFP ABI" A few other tests suffer from the same problem though, and the guard is tricky to get right :-( Even those using something like dg-require-effective-target arm_arch_v4t_ok are not protected because this effective target relies on preprocessor defines only. Adding a variable declaration in arm_arch_FUNC_ok (in target-supports.exp, like check_effective_target_arm_thumb1) would make the effective target test fail, but I never understood why it isn't desirable to do so (I proposed a patch years ago :-) Christophe
On 01/17/2017 04:57 PM, Christophe Lyon wrote: > Hi Vladimir, > > On 17 January 2017 at 17:14, Vladimir Makarov <vmakarov@redhat.com> wrote: >> The following patch fixes >> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058 >> >> The patch was successfully bootstrapped and tested on x86-64. >> >> Committed as rev. 244535. >> >> > The new testcase fails to compile on arm*-linux-gnueabihf configurations > when using -mthumb (either via runtestflags or configuring gcc > --with-mode=thumb) > because "sorry, unimplemented: Thumb-1 hard-float VFP ABI" > > A few other tests suffer from the same problem though, and the guard is > tricky to get right :-( Yes, it is very tricky. So how can I fix the failure. Should I add 'dg-require-effective-target arm_arch_v4t_ok' to the test?
Index: ChangeLog =================================================================== --- ChangeLog (revision 244534) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2017-01-17 Vladimir Makarov <vmakarov@redhat.com> + + PR target/79058 + * ira-conflicts.c (ira_build_conflicts): Update total conflict + hard regs for inner regno. + 2017-01-17 Martin Liska <mliska@suse.cz> PR ipa/71207 Index: ira-conflicts.c =================================================================== --- ira-conflicts.c (revision 244500) +++ ira-conflicts.c (working copy) @@ -787,8 +787,12 @@ ira_build_conflicts (void) if (outer_regno < 0 || !in_hard_reg_set_p (reg_class_contents[aclass], outer_mode, outer_regno)) - SET_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), - inner_regno); + { + SET_HARD_REG_BIT (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj), + inner_regno); + SET_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS (obj), + inner_regno); + } } } Index: testsuite/ChangeLog =================================================================== --- testsuite/ChangeLog (revision 244534) +++ testsuite/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2017-01-17 Vladimir Makarov <vmakarov@redhat.com> + + PR target/79058 + * gcc.target/arm/pr79058.c: New. + 2017-01-17 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/71854 Index: testsuite/gcc.target/arm/pr79058.c =================================================================== --- testsuite/gcc.target/arm/pr79058.c (revision 0) +++ testsuite/gcc.target/arm/pr79058.c (working copy) @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "-mcpu=arm7tdmi" } } */ +/* { dg-options "-Os -mbig-endian -mcpu=arm7tdmi" } */ + +enum { NILFS_SEGMENT_USAGE_ACTIVE, NILFS_SEGMENT_USAGE_DIRTY } a; + +void fn2 (long long); + +void fn1() { + int b = a & 1 << NILFS_SEGMENT_USAGE_DIRTY; + fn2 (b ? (long long) -1 : 0); +}