[ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated part 2

Message ID CAKdteOa4iGEX_+hQFSdZehC3S1KR5KevNktwc492=YkZTDp0Mw@mail.gmail.com
State New
Headers show
Series
  • [ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated part 2
Related show

Commit Message

Christophe Lyon Oct. 13, 2017, 7:41 a.m.
Hi,

The attached small patch solves PR 67591 and removes occurrences of
"IT blocks containing 32-bit Thumb instructions are deprecated in
ARMv8". It is similar to the patch I committed recently and updates
the 3 remaining patterns that can generate such instructions. I
checked gcc.log, g++.log, libstdc++.log and gfortran.log and found no
occurrence of the warning with this patch applied.

Cross-tested on arm-none-linux-gnueabihf with -mthumb/-march=armv8-a
and --with-cpu=cortex-a57 --with-mode=thumb, and also bootstrapped
successfully on armv8 HW in thumb mode.

Benchmarking shows no noticeable difference.

OK for trunk?

Thanks,

Christophe
2017-10-13  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/67591
	* config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
	attribute.
	(*cmp_ite0): Add enabled_for_depr_it attribute.
	(*cmp_ite1): Likewise.

Comments

Richard Earnshaw (lists) Oct. 20, 2017, 2:41 p.m. | #1
On 13/10/17 08:41, Christophe Lyon wrote:
> Hi,
> 
> The attached small patch solves PR 67591 and removes occurrences of
> "IT blocks containing 32-bit Thumb instructions are deprecated in
> ARMv8". It is similar to the patch I committed recently and updates
> the 3 remaining patterns that can generate such instructions. I
> checked gcc.log, g++.log, libstdc++.log and gfortran.log and found no
> occurrence of the warning with this patch applied.
> 
> Cross-tested on arm-none-linux-gnueabihf with -mthumb/-march=armv8-a
> and --with-cpu=cortex-a57 --with-mode=thumb, and also bootstrapped
> successfully on armv8 HW in thumb mode.
> 
> Benchmarking shows no noticeable difference.
> 
> OK for trunk?
> 

OK.

R.

> Thanks,
> 
> Christophe
> 
> 
> depr-it-2.chlog.txt
> 
> 
> 2017-10-13  Christophe Lyon  <christophe.lyon@linaro.org>
> 
> 	PR target/67591
> 	* config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
> 	attribute.
> 	(*cmp_ite0): Add enabled_for_depr_it attribute.
> 	(*cmp_ite1): Likewise.
> 
> 
> depr-it-2.patch.txt
> 
> 
> diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
> index f241f9d..093db74 100644
> --- a/gcc/config/arm/arm.md
> +++ b/gcc/config/arm/arm.md
> @@ -8960,6 +8960,7 @@
>    "TARGET_32BIT"
>    "sub%?\\t%0, %1, %3%S2"
>    [(set_attr "predicable" "yes")
> +   (set_attr "predicable_short_it" "no")
>     (set_attr "shift" "3")
>     (set_attr "arch" "32,a")
>     (set_attr "type" "alus_shift_imm,alus_shift_reg")])
> @@ -9398,6 +9399,7 @@
>    }"
>    [(set_attr "conds" "set")
>     (set_attr "arch" "t2,t2,t2,t2,t2,any,any,any,any")
> +   (set_attr "enabled_for_depr_it" "yes,no,no,no,no,no,no,no,no")
>     (set_attr "type" "multiple")
>     (set_attr_alternative "length"
>        [(const_int 6)
> @@ -9481,6 +9483,7 @@
>    }"
>    [(set_attr "conds" "set")
>     (set_attr "arch" "t2,t2,t2,t2,t2,any,any,any,any")
> +   (set_attr "enabled_for_depr_it" "yes,no,no,no,no,no,no,no,no")
>     (set_attr_alternative "length"
>        [(const_int 6)
>         (const_int 8)
>

Patch

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index f241f9d..093db74 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -8960,6 +8960,7 @@ 
   "TARGET_32BIT"
   "sub%?\\t%0, %1, %3%S2"
   [(set_attr "predicable" "yes")
+   (set_attr "predicable_short_it" "no")
    (set_attr "shift" "3")
    (set_attr "arch" "32,a")
    (set_attr "type" "alus_shift_imm,alus_shift_reg")])
@@ -9398,6 +9399,7 @@ 
   }"
   [(set_attr "conds" "set")
    (set_attr "arch" "t2,t2,t2,t2,t2,any,any,any,any")
+   (set_attr "enabled_for_depr_it" "yes,no,no,no,no,no,no,no,no")
    (set_attr "type" "multiple")
    (set_attr_alternative "length"
       [(const_int 6)
@@ -9481,6 +9483,7 @@ 
   }"
   [(set_attr "conds" "set")
    (set_attr "arch" "t2,t2,t2,t2,t2,any,any,any,any")
+   (set_attr "enabled_for_depr_it" "yes,no,no,no,no,no,no,no,no")
    (set_attr_alternative "length"
       [(const_int 6)
        (const_int 8)