* [PATCH][GCC][Arm]: MVE Don't use lsll for 32-bit shifts scalar
@ 2020-04-07 10:42 Andre Vieira (lists)
2020-04-07 14:06 ` Kyrylo Tkachov
0 siblings, 1 reply; 2+ messages in thread
From: Andre Vieira (lists) @ 2020-04-07 10:42 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
Hi,
After fixing the v[id]wdups using the "moving the wrap parameter" into
the top-end of a DImode operand using a shift, I noticed we were using
lsll for 32-bit shifts in scalars, where we don't need to, as we can
simply do a move, which is much better if we don't need to use the
bottom part.
We can solve this in a better way, but for now this will do.
Regression tested on arm-none-eabi.
Is this OK for trunk?
2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/arm.d (ashldi3): Don't use lsll for constant 32-bit
shifts.
[-- Attachment #2: mve_fix_lsll.patch --]
[-- Type: text/plain, Size: 718 bytes --]
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 1a7ea0d701e5677965574d877d0fe4b2f5bc149f..6d5560398dae3d0ace0342b4907542d2a6865f70 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -4422,7 +4422,8 @@ (define_expand "ashldi3"
operands[2] = force_reg (SImode, operands[2]);
/* Armv8.1-M Mainline double shifts are not expanded. */
- if (arm_reg_or_long_shift_imm (operands[2], GET_MODE (operands[2])))
+ if (arm_reg_or_long_shift_imm (operands[2], GET_MODE (operands[2]))
+ && (REG_P (operands[2]) || INTVAL(operands[2]) != 32))
{
if (!reg_overlap_mentioned_p(operands[0], operands[1]))
emit_insn (gen_movdi (operands[0], operands[1]));
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH][GCC][Arm]: MVE Don't use lsll for 32-bit shifts scalar
2020-04-07 10:42 [PATCH][GCC][Arm]: MVE Don't use lsll for 32-bit shifts scalar Andre Vieira (lists)
@ 2020-04-07 14:06 ` Kyrylo Tkachov
0 siblings, 0 replies; 2+ messages in thread
From: Kyrylo Tkachov @ 2020-04-07 14:06 UTC (permalink / raw)
To: Andre Simoes Dias Vieira, gcc-patches
> -----Original Message-----
> From: Andre Vieira (lists) <andre.simoesdiasvieira@arm.com>
> Sent: 07 April 2020 11:43
> To: gcc-patches@gcc.gnu.org
> Cc: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
> Subject: [PATCH][GCC][Arm]: MVE Don't use lsll for 32-bit shifts scalar
>
> Hi,
>
> After fixing the v[id]wdups using the "moving the wrap parameter" into
> the top-end of a DImode operand using a shift, I noticed we were using
> lsll for 32-bit shifts in scalars, where we don't need to, as we can
> simply do a move, which is much better if we don't need to use the
> bottom part.
>
> We can solve this in a better way, but for now this will do.
>
> Regression tested on arm-none-eabi.
>
> Is this OK for trunk?
Ok.
Thanks,
Kyrill
>
> 2020-04-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
>
> * config/arm/arm.d (ashldi3): Don't use lsll for constant 32-bit
> shifts.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-07 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 10:42 [PATCH][GCC][Arm]: MVE Don't use lsll for 32-bit shifts scalar Andre Vieira (lists)
2020-04-07 14:06 ` Kyrylo Tkachov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).