diff mbox

[AArch64] Fix insn types

Message ID 56261E8B.9000107@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Oct. 20, 2015, 10:59 a.m. UTC
Hi Evandro,

On 19/10/15 22:05, Evandro Menezes wrote:
> The type assigned to some insn definitions was seemingly not correct:
>
>  * "movi %d0, %1" was of type "fmov"
>  * "fmov %s0, wzr" was of type "fconstd"
>  * "mov %<w>0, {-1,1}" were of type "csel"
>
> This patch changes their types to:
>
>  * "movi %d0, %1" to type "neon_move"
>  * "fmov %s0, wzr" to type "f_mcr"
>  * "mov %<w>0, {-1,1}" to type "mov_imm"
>
> Please, commit if it's alright.
>
> Thank you,
>

Looking at your ChangeLog...

gcc/
	* config/aarch64/aarch64.md
	(*movdi_aarch64): Change the type of "movi %d0, %1" to "neon_move".
	(*movtf_aarch64): Change the type of "fmov %s0, wzr" to "f_mcr".
	(*cmov<mode>_insn): Change the types of "mov %<w>0, {-1,1}" to "mov_imm".
	(*cmovsi_insn_uxtw): Idem

The preferred form is "Likewise" rather than "Idem" AFAIK. Also, full stop at the end.



I don't think this matches up with your changelog entry.
This isn't the *movdi_aarch64 pattern. From what I can see the *movdi_aarch64 pattern
already has the type neon_move on the movi\\t%d0, %1 alternative (the last one).

In fact, if I apply your patch using "patch -p1" I see it being applied to the *movhf_aarch64 pattern.
Is that what you intended?

Thanks,
Kyrill

Comments

Evandro Menezes Oct. 20, 2015, 4:14 p.m. UTC | #1
Kyrill,

Indeed, the correct log would be:

     The type assigned to some insn definitions was not correct.

     gcc/
         * config/aarch64/aarch64.md
         (*movhf_aarch64): Change the type of "mov %0.h[0], %1.h[0] to 
"neon_move".
         (*movtf_aarch64): Change the type of "fmov %s0, wzr" to "f_mcr".
         (*cmov<mode>_insn): Change the types of "mov %<w>0, {-1,1}" to 
"mov_imm".
         (*cmovsi_insn_uxtw): Likewise.

Thank you,
Evandro Menezes Oct. 28, 2015, 6:39 p.m. UTC | #2
Ping.
Marcus Shawcroft Oct. 30, 2015, 9:55 a.m. UTC | #3
On 20 October 2015 at 17:14, Evandro Menezes <e.menezes@samsung.com> wrote:
> Kyrill,
>
> Indeed, the correct log would be:
>
>     The type assigned to some insn definitions was not correct.
>
>     gcc/
>         * config/aarch64/aarch64.md
>         (*movhf_aarch64): Change the type of "mov %0.h[0], %1.h[0] to
> "neon_move".
>         (*movtf_aarch64): Change the type of "fmov %s0, wzr" to "f_mcr".
>         (*cmov<mode>_insn): Change the types of "mov %<w>0, {-1,1}" to
> "mov_imm".
>         (*cmovsi_insn_uxtw): Likewise.
>
> Thank you,
>

OK thanks,  committed as r229572.

/Marcus
diff mbox

Patch

--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1130,7 +1130,7 @@ 
     ldrh\\t%w0, %1
     strh\\t%w1, %0
     mov\\t%w0, %w1"
-  [(set_attr "type" "neon_from_gp,neon_to_gp,fmov,\
+  [(set_attr "type" "neon_from_gp,neon_to_gp,neon_move,\
                       f_loads,f_stores,load1,store1,mov_reg")
     (set_attr "simd" "yes,yes,yes,*,*,*,*,*")
     (set_attr "fp"   "*,*,*,yes,yes,*,*,*")]