diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2016-06-15 10:08:24 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2016-06-15 10:08:24 +0000 |
commit | 3256673f86cb878b41da25db3d4785418d6cf2c9 (patch) | |
tree | cfc4a7a59fa6d267787e617c85e69070ed21174a /gcc/ifcvt.c | |
parent | b17dc4d4e42c4366f60ad79cdc31f7b1260e058e (diff) | |
download | gcc-3256673f86cb878b41da25db3d4785418d6cf2c9.zip gcc-3256673f86cb878b41da25db3d4785418d6cf2c9.tar.gz gcc-3256673f86cb878b41da25db3d4785418d6cf2c9.tar.bz2 |
[RTL ifcvt] Allow simple register subregs in noce_convert_multiple_sets
* ifcvt.c (bb_ok_for_noce_multiple_sets): Allow simple lowpart
register subregs in SET_SRC.
* gcc.target/aarch64/ifcvt_multiple_sets_subreg_1.c: New test.
From-SVN: r237475
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 4a277db..fd29516 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -3339,9 +3339,15 @@ bb_ok_for_noce_convert_multiple_sets (basic_block test_bb, rtx src = SET_SRC (set); /* We can possibly relax this, but for now only handle REG to REG - moves. This avoids any issues that might come from introducing - loads/stores that might violate data-race-freedom guarantees. */ - if (!(REG_P (src) && REG_P (dest))) + (including subreg) moves. This avoids any issues that might come + from introducing loads/stores that might violate data-race-freedom + guarantees. */ + if (!REG_P (dest)) + return false; + + if (!(REG_P (src) + || (GET_CODE (src) == SUBREG && REG_P (SUBREG_REG (src)) + && subreg_lowpart_p (src)))) return false; /* Destination must be appropriate for a conditional write. */ |