[PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3
Mon Aug 17 08:05:41 GMT 2020
> -----Original Message-----
> From: Richard Sandiford [mailto:email@example.com]
> Sent: Wednesday, August 5, 2020 12:26 AM
> To: xiezhiheng <firstname.lastname@example.org>
> Cc: Richard Biener <email@example.com>; firstname.lastname@example.org
> Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions
> emitted at -O3
> xiezhiheng <email@example.com> writes:
> >> > Sorry, I should have used it. And I prepare a patch to use
> >> > macro and add a flag FLAG_SUPPRESS_FP_EXCEPTIONS to suppress
> >> > FLAG_RAISE_FP_EXCEPTIONS for certain intrinsics in future.
> >> The same thing is true for reading FPCR as well, so I think the flag
> >> should suppress the FLOAT_MODE_P check, instead of fixing up the flags
> >> afterwards.
> >> I'm struggling to think of a good name though. How about adding
> >> FLAG_AUTO_FP and making the FLOAT_MODE_P check dependent on
> >> FLAG_AUTO_FP
> >> being set?
> >> We could leave FLAG_AUTO_FP out of FLAG_ALL, since FLAG_ALL already
> >> includes FLAG_FP. Including it in FLAG_ALL wouldn't do no any harm
> >> though.
> > I could not think of a better name either. So I choose to use
> > to control the check of FLOAT_MODE_P finally.
> > Bootstrapped and tested on aarch64 Linux platform.
> Thanks, pushed to master.
I add FLAGS for part of intrinsics in aarch64-simd-builtins.def first for a try,
including all the add/sub arithmetic intrinsics.
Something like faddp intrinsic which only handles floating-point operations,
both FP and NONE flags are suitable for it because FLAG_FP will be added
later if the intrinsic handles floating-point operations. And I prefer FP since
it would be more clear.
But for qadd intrinsics, they would modify FPSR register which is a scenario
I missed before. And I consider to add an additional flag FLAG_WRITE_FPSR
to represent it.
Bootstrapped and tested on aarch64 Linux platform.
Have any suggestions?
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9cf1f9733e7..cde50c54d9e 100644
@@ -1,3 +1,10 @@
+2020-08-17 Zhiheng Xie <firstname.lastname@example.org>
+ * config/aarch64/aarch64-builtins.c (aarch64_modifies_global_state_p):
+ Add flag FLAG_WRITE_FPSR to control attribtues.
+ * config/aarch64/aarch64-simd-builtins.def: Add proper FLAGS
+ for intrinsic functions.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7727 bytes
More information about the Gcc-patches