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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-06-25
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
;;   basic block 3, loop depth 0, maybe hot
;;    prev block 2, next block 4, flags: (NEW, VISITED)
;;    pred:       2 (TRUE_VALUE,EXECUTABLE)
  # VUSE <.MEM_13(D)>
  b.1_2 = bD.4438;
  # RANGE [irange] unsigned int [0, 32767][4294934528, +INF]
  _3 = (unsigned intD.15) b.1_2;
  # RANGE [irange] unsigned int [4294901760, +INF]
  iftmp.0_14 = _3 + 4294934528;
  goto <bb 5>; [INV]
;;    succ:       5 (FALLTHRU,EXECUTABLE)

;;   basic block 4, loop depth 0, maybe hot
;;    prev block 3, next block 5, flags: (NEW, VISITED)
;;    pred:       2 (FALSE_VALUE,EXECUTABLE)
  _4 = (unsigned intD.15) a_11(D);
  iftmp.0_12 = _4 + 4294934528;
;;    succ:       5 (FALLTHRU,EXECUTABLE)

;;   basic block 5, loop depth 0, maybe hot
;;    prev block 4, next block 1, flags: (NEW, VISITED)
;;    pred:       3 (FALLTHRU,EXECUTABLE)
;;                4 (FALLTHRU,EXECUTABLE)
  # iftmp.0_8 = PHI <iftmp.0_14(3), iftmp.0_12(4)>
  _5 = _1 << iftmp.0_8;


So we could see that bb3 is undefined due to the shift right afterwards and
either change it to being __builtin_unreachable or __builtin_trap and then
optimize it further. 

This is a job for gimple-ssa-isolate-paths to handle really.

Reply via email to