https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114965

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh I see where the bug is coming from.

reassociation is turning:
  _2 = pad_6 == 48;
  _3 = pad_6 == 43;
  _4 = _2 | _3;

Into:
  _11 = (unsigned char) pad_6;
  _12 = (int) _11;
  _13 = 290271069732864 >> _12;
  _14 = _13 & 1;
  _15 = _14 == 0;
  _16 = ~_15;
  _4 = _16;

Which is invalid as pad_6 could be greater than 64.


Rank for pad_6 is 393216
Rank for _3 is 393217
Rank for _2 is 393217
Matching expression match.pd:179, gimple-match-8.cc:45
Matching expression match.pd:179, gimple-match-8.cc:45
Matching expression match.pd:2243, gimple-match-5.cc:20
Applying pattern match.pd:219, generic-match-1.cc:3159
Matching expression match.pd:2833, generic-match-4.cc:22
Matching expression match.pd:2840, generic-match-3.cc:38
Matching expression match.pd:2845, generic-match-2.cc:23
Matching expression match.pd:2833, generic-match-4.cc:22
Matching expression match.pd:2840, generic-match-3.cc:38
Matching expression match.pd:2845, generic-match-2.cc:23
Matching expression match.pd:2835, gimple-match-2.cc:35
Matching expression match.pd:2838, gimple-match-1.cc:66
Matching expression match.pd:2845, gimple-match-2.cc:96
Matching expression match.pd:2243, generic-match-7.cc:21
Matching expression match.pd:2835, generic-match-4.cc:36
Matching expression match.pd:2838, generic-match-3.cc:53
Matching expression match.pd:2845, generic-match-2.cc:23
Optimizing range tests pad_6 -[43, 43] and -[48, 48]
 into _15
Transforming _4 = _2 | _3;
 into _4 = _16;
Rank for _11 is 393217
Rank for _12 is 393218
Rank for _13 is 393219

Reply via email to