]> gcc.gnu.org Git - gcc.git/commit
i386: Optimize lea with zero-extend. [PR 101716]
authorHongyu Wang <hongyu.wang@intel.com>
Tue, 17 Aug 2021 08:53:46 +0000 (16:53 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Wed, 25 Aug 2021 09:03:46 +0000 (17:03 +0800)
commit87afc7b81cd44d04997add383856b2504af3afe6
tree14de7ac8597c4f85f059fe75a1564ce34df40fd4
parent3673dcf6d6baeb67bb70ff03d4cb3f92beed0075
i386: Optimize lea with zero-extend. [PR 101716]

For ASHIFT + ZERO_EXTEND pattern, combine pass failed to
match it to lea since it will generate non-canonical
zero-extend. Adjust predicate and cost_model to allow combine
for lea.

gcc/ChangeLog:

PR target/101716
* config/i386/i386.c (ix86_live_on_entry): Adjust comment.
(ix86_decompose_address): Remove retval check for ASHIFT,
allow non-canonical zero extend if AND mask covers ASHIFT
count.
(ix86_legitimate_address_p): Adjust condition for decompose.
(ix86_rtx_costs): Adjust cost for lea with non-canonical
zero-extend.

Co-Authored by: Uros Bizjak <ubizjak@gmail.com>

gcc/testsuite/ChangeLog:

PR target/101716
* gcc.target/i386/pr101716.c: New test.
gcc/config/i386/i386.c
gcc/testsuite/gcc.target/i386/pr101716.c [new file with mode: 0644]
This page took 0.074114 seconds and 5 git commands to generate.