    aarch64: Expand %<w> correctly according to mode iterator
    
    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-07-28  Bin Cheng  <bin.cheng@linux.alibaba.com>
    
    gcc/
            * config/aarch64/aarch64.md
            (*extend<SHORT:mode><GPI:mode>2_aarch64): Use %<GPI:w>0.

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index eb8ccd4b97b..7085cd4a51d 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1880,7 +1880,7 @@
   "@
    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")]
 )
