Message ID | 55473BF4.3010603@st.com |
---|---|
State | New |
Headers | show |
Hi Christian, On 4 May 2015 at 11:29, Christian Bruel <christian.bruel@st.com> wrote: > >> Hi Christian, >> I noticed case gcc.dg/ipa/iinline-attr.c failed on aarch64. The >> original patch is x86 specific, while the case is added as general >> one. Could you please have a look at this? >> >> FAIL: gcc.dg/ipa/iinline-attr.c scan-ipa-dump inline >> "hooray[^\\n]*inline copy in test" >> > > that is the same latent bug for aarch64: alignment flags are not > propagated with attribute optimize ("O2"). > > testing attached patch The patch looks good to me, maybe you can just fix the original typo on "optimizing" in the comments while moving the code. I've bootstrapped and regtested it on aarch64-linux-gnu with the same target testcase you added on i386 (as we discussed offline) and everything is ok (gcc.dg/ipa/iinline-attr.c now PASS). Notice that I can't approve your patch. Cheers, Yvan
thanks for the validation and the confirmation that iinline-attr.c is now fixed on aarch64. I can now send the patch for submission request (this one was just illustrative). thanks Christian On 05/05/2015 11:10 AM, Yvan Roux wrote: > Hi Christian, > > On 4 May 2015 at 11:29, Christian Bruel <christian.bruel@st.com> wrote: >> >>> Hi Christian, >>> I noticed case gcc.dg/ipa/iinline-attr.c failed on aarch64. The >>> original patch is x86 specific, while the case is added as general >>> one. Could you please have a look at this? >>> >>> FAIL: gcc.dg/ipa/iinline-attr.c scan-ipa-dump inline >>> "hooray[^\\n]*inline copy in test" >>> >> >> that is the same latent bug for aarch64: alignment flags are not >> propagated with attribute optimize ("O2"). >> >> testing attached patch > > The patch looks good to me, maybe you can just fix the original typo > on "optimizing" in the comments while moving the code. I've > bootstrapped and regtested it on aarch64-linux-gnu with the same > target testcase you added on i386 (as we discussed offline) and > everything is ok (gcc.dg/ipa/iinline-attr.c now PASS). Notice that I > can't approve your patch. > > Cheers, > Yvan >
Index: config/aarch64/aarch64.c =================================================================== --- config/aarch64/aarch64.c (revision 222627) +++ config/aarch64/aarch64.c (working copy) @@ -6908,18 +6908,6 @@ #endif } - /* If not opzimizing for size, set the default - alignment to what the target wants */ - if (!optimize_size) - { - if (align_loops <= 0) - align_loops = aarch64_tune_params->loop_align; - if (align_jumps <= 0) - align_jumps = aarch64_tune_params->jump_align; - if (align_functions <= 0) - align_functions = aarch64_tune_params->function_align; - } - if (AARCH64_TUNE_FMA_STEERING) aarch64_register_fma_steering (); @@ -6935,6 +6923,18 @@ flag_omit_leaf_frame_pointer = false; else if (flag_omit_leaf_frame_pointer) flag_omit_frame_pointer = true; + + /* If not opzimizing for size, set the default + alignment to what the target wants */ + if (!optimize_size) + { + if (align_loops <= 0) + align_loops = aarch64_tune_params->loop_align; + if (align_jumps <= 0) + align_jumps = aarch64_tune_params->jump_align; + if (align_functions <= 0) + align_functions = aarch64_tune_params->function_align; + } } static struct machine_function *