]> git.ipfire.org Git - thirdparty/gcc.git/commit
[ifcombine] robustify decode_field_reference
authorAlexandre Oliva <oliva@adacore.com>
Tue, 14 Jan 2025 19:45:58 +0000 (16:45 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Tue, 14 Jan 2025 19:45:58 +0000 (16:45 -0300)
commit5006b9d810b102d7360b503288a983fc6488c289
treeac5876c5dbcbcb16ee691ae72f8d04950b8d9f63
parente939005c496dfd4058fa57b6860bfadcabe4a111
[ifcombine] robustify decode_field_reference

Arrange for decode_field_reference to use local variables throughout,
to modify the out parms only when we're about to return non-NULL, and
to drop the unused case of NULL pand_mask, that had a latent failure
to detect signbit masking.

for  gcc/ChangeLog

* gimple-fold.cc (decode_field_reference): Rebustify to set
out parms only when returning non-NULL.
(fold_truth_andor_for_ifcombine): Bail if
decode_field_reference returns NULL.  Add complementary assert
on r_const's not being set when l_const isn't.
gcc/gimple-fold.cc