aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.def
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2025-01-10 09:32:38 -0300
committerAlexandre Oliva <oliva@gnu.org>2025-01-10 09:40:39 -0300
commit740c84975ceb7426da656dc7115445872a9e5b6f (patch)
tree204259bf09e1a49c5e0e668c7aff6302f0a27f0f /gcc/builtins.def
parentc96a6c2c264776d8138c6b303d005e74f047cfa0 (diff)
downloadgcc-740c84975ceb7426da656dc7115445872a9e5b6f.zip
gcc-740c84975ceb7426da656dc7115445872a9e5b6f.tar.gz
gcc-740c84975ceb7426da656dc7115445872a9e5b6f.tar.bz2
[ifcombine] reuse left-hand mask to decode right-hand xor operand
If fold_truth_andor_for_ifcombine applies a mask to an xor, say because the result of the xor is compared with a power of two [minus one], we have to apply the same mask when processing both the left- and right-hand xor paths for the transformation to be sound. Arrange for decode_field_reference to propagate the incoming mask along with the expression to the right-hand operand. Don't require the right-hand xor operand to be a constant, that was a cut&pasto. for gcc/ChangeLog * gimple-fold.cc (decode_field_reference): Add xor_pand_mask. Propagate pand_mask to the right-hand xor operand. Don't require the right-hand xor operand to be a constant. (fold_truth_andor_for_ifcombine): Pass right-hand mask when appropriate.
Diffstat (limited to 'gcc/builtins.def')
0 files changed, 0 insertions, 0 deletions