aarch64: Expand %<w> correctly according to mode iterator
authorBin Cheng <bin.cheng@linux.alibaba.com>
Mon, 9 Aug 2021 09:21:03 +0000 (17:21 +0800)
committerBin Cheng <bin.cheng@linux.alibaba.com>
Mon, 9 Aug 2021 09:21:03 +0000 (17:21 +0800)
Pattern "*extend<SHORT:mode><GPI:mode>2_aarch64" is duplicated
from the corresponding zero_extend pattern, however %<w> needs
to be expanded according to its mode iterator because the smov
instruction is different to umov.

2021-08-09  Bin Cheng  <bin.cheng@linux.alibaba.com>

gcc/
* config/aarch64/aarch64.md
(*extend<SHORT:mode><GPI:mode>2_aarch64): Use %<GPI:w>0.

gcc/config/aarch64/aarch64.md

index eb8ccd4..7085cd4 100644 (file)
   "@
    sxt<SHORT:size>\t%<GPI:w>0, %w1
    ldrs<SHORT:size>\t%<GPI:w>0, %1
-   smov\t%w0, %1.<SHORT:size>[0]"
+   smov\t%<GPI:w>0, %1.<SHORT:size>[0]"
   [(set_attr "type" "extend,load_4,neon_to_gp")
    (set_attr "arch" "*,*,fp")]
 )