This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH GCC] Tweak gimple-ssa-strength-reduction.c:backtrace_base_for_ref () to cover different cases as seen on AArch64


Please find the updated version of the patch in the attachment. It has addressed the previous comments and also included some changes in order to pass the bootstrapping on x86_64.

It's also passed the regtest on arm-none-eabi and aarch64-none-elf.

It will also fix the test failure as reported here:

OK for the trunk?



* gimple-ssa-strength-reduction.c (safe_to_multiply_p): New function.
        (backtrace_base_for_ref): Call get_unwidened, check 'base_in'
again and set unwidend_p with true; call safe_to_multiply_p to avoid
        unsafe unwidened cases.


        * gcc.dg/tree-ssa/slsr-40.c: New test.

On 09/11/13 13:39, Bill Schmidt wrote:
On Wed, 2013-09-11 at 10:32 +0200, Richard Biener wrote:
On Tue, Sep 10, 2013 at 5:53 PM, Yufeng Zhang<>  wrote:

Following Bin's patch in, this patch tweaks
backtrace_base_for_ref () to strip of any widening conversion after the
first TREE_CODE check fails.  Without this patch, the test
(gcc.dg/tree-ssa/slsr-39.c) in Bin's patch will fail on AArch64, as
backtrace_base_for_ref () will stop if not seeing an ssa_name since the tree
code can be nop_expr instead.

Regtested on arm and aarch64; still bootstrapping x86_64.

OK for the trunk if the x86_64 bootstrap succeeds?

Please add a testcase.

Also, the comment "Strip of" should read "Strip off".  Otherwise I have
no comments.



Attachment: patch
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]