diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-01-08 13:58:28 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-01-08 13:58:28 +0100 |
commit | efef8d7ff43c6c489fd6e7c52d71494d21324c87 (patch) | |
tree | d25d5883fdc1e4c6247ed02e770f781cbc7c70e6 /gcc/tree-vect-loop.cc | |
parent | 7590d975ecfdae4f112b5086c017101c08f07e3e (diff) | |
download | gcc-efef8d7ff43c6c489fd6e7c52d71494d21324c87.zip gcc-efef8d7ff43c6c489fd6e7c52d71494d21324c87.tar.gz gcc-efef8d7ff43c6c489fd6e7c52d71494d21324c87.tar.bz2 |
lower-bitint: Fix up lowering of huge _BitInt 0 PHI args [PR113120]
The PHI argument expansion of INTEGER_CSTs where bitint_min_cst_precision
returns significantly smaller precision than the PHI result precision is
optimized by loading the much smaller constant (if any) from memory and
then either setting the remaining limbs to {} or calling memset with -1.
The case where no constant is loaded (i.e. c == NULL) is when the
INTEGER_CST is 0 or all_ones - in that case we can just set all the limbs
to {} or call memset with -1 on everything.
While for the all ones extension case that is what the code was already
doing, I missed one spot in the zero extension case, where constricting
the offset of the MEM_REF lhs of the = {} store it was using unconditionally
the byte size of c, which obviously doesn't work if c is NULL. In that case
we want to use zero offset.
2024-01-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/113120
* gimple-lower-bitint.cc (gimple_lower_bitint): Fix handling of very
large _BitInt zero INTEGER_CST PHI argument.
* gcc.dg/bitint-62.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions