https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79191
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2017-08-28 00:00:00 |2023-5-11 --- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- If we take a look at the current dump: ``` =========== BB 2 ============ Imports: m_1(D) Exports: m_1(D) n_2 n_2 : m_1(D)(I) m_1(D) [irange] long unsigned int VARYING Partial equiv (n_2 pe32 m_1(D)) <bb 2> [local count: 1073741824]: n_2 = (unsigned int) m_1(D); if (n_2 <= 2) goto <bb 3>; [50.00%] else goto <bb 5>; [50.00%] 2->3 (T) m_1(D) : [irange] long unsigned int [0, 2][4294967296, 18446744069414584322] 2->3 (T) n_2 : [irange] unsigned int [0, 2] NONZERO 0x3 ``` Since we know that n_3 has a nonzero value of 0x3, then m_1 has a nonzero of 0xffffffff00000003 since it is a truncating cast, we can only say what the lower bits are. And then it will just work correctly I think ...