[Ada] Improve optimization of "=" on bit-packed arrays
Pierre-Marie de Rodat
derodat@adacore.com
Thu May 19 14:15:58 GMT 2022
This patch fixes a performance regression, introduced by a previous bug
fix. That fix had the unintended side effect of removing the
optimization in cases where the two operands are of two different
compiler-generated modular types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_pakd.adb (Expand_Packed_Eq): Replace the check for *same*
modular type, with a check for any modular type, and assert that
the two types have the same modulus and so on.
* exp_pakd.ads: Minor comment improvements.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 2969 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220519/05b642ad/attachment.bin>
More information about the Gcc-patches
mailing list