diff options
author | Martin Liska <mliska@suse.cz> | 2020-08-13 09:38:41 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-08-13 10:27:37 +0200 |
commit | f91770216eade83f068528c1e4f00e2ac3b23044 (patch) | |
tree | 21fa47470882ead9d0bc6ce20225990b26e3e5ab /gcc/ipa-cp.c | |
parent | 2b5490f5d1633fedf20e6eba87153c5963c61368 (diff) | |
download | gcc-f91770216eade83f068528c1e4f00e2ac3b23044.zip gcc-f91770216eade83f068528c1e4f00e2ac3b23044.tar.gz gcc-f91770216eade83f068528c1e4f00e2ac3b23044.tar.bz2 |
ipa: fix ICE in get_default_value
The patch aligns code with ipcp_bits_lattice::set_to_constant
where we properly mask m_value with m_mask. The same should
be done here.
gcc/ChangeLog:
PR ipa/96482
* ipa-cp.c (ipcp_bits_lattice::meet_with_1): Mask m_value
with m_mask.
gcc/testsuite/ChangeLog:
PR ipa/96482
* gcc.dg/ipa/pr96482-2.c: New test.
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 2b21280..e4910a0 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -1048,7 +1048,7 @@ ipcp_bits_lattice::meet_with_1 (widest_int value, widest_int mask, widest_int old_mask = m_mask; m_mask = (m_mask | mask) | (m_value ^ value); - m_value &= value; + m_value &= ~m_mask; if (wi::sext (m_mask, precision) == -1) return set_to_bottom (); |