[PATCH] x86: Provide expanders for truncdisi2 and friends.
Roger Sayle
roger@nextmovesoftware.com
Mon Jul 13 14:50:07 GMT 2020
Hi Richard,
> It seems to be improving TARGET_TRULY_NOOP_TRUNCATION documentation might be useful here.
This is an excellent suggestion. How about the following/attached:
2020-07-13 Roger Sayle <roger@nextmovesoftware.com>
gcc/ChangeLog:
* doc/tm.texi (TARGET_TRULY_NOOP_TRUNCATION): Clarify that targets
that (sometimes) return false, indicating SUBREGs shouldn't be
used, also need to provide a trunc?i?i2 optab that performs this
truncation.
> The only user (after your patch) of this hook is in function.c for the function parameter setup btw.
The targetm.truly_noop_truncation in assign_parm_setup_block is the last place that calls this
hook directly (with sizes), but the majority of uses go via TRULY_NOOP_TRUNCATION_MODES_P
as defined in machmode.h.
I'll prepare a patch to switch function.c to use TRULY_NOOP_TRUNCATION_MODE_P so that we
are consistent throughout the compiler. In theory, this hook could then be changed to take modes
instead of (poly_unit64) sizes, but that clean-up might be tricky without access to the affected
platforms.
The hard register semantics that you're referring to are related to TARGET_MODES_TIEABLE_P,
which is documented to have interesting interactions with TARGET_TRULY_NOOP_TRUNCATION.
Is the above documentation change Ok for mainline?
Thanks,
Roger
--
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patche.txt
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200713/7d45c814/attachment.txt>
More information about the Gcc-patches
mailing list