[Bug middle-end/103431] [12 Regression] wrong code with -O -fno-tree-bit-ccp -fno-tree-dominator-opts since r12-4853-g2a83259f837e5cbd

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 26 11:40:59 GMT 2021


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The bug is in the x86*_shld and x86*_shrd patterns.
  [(set (match_operand:SI 0 "nonimmediate_operand" "+r*m")
        (ior:SI (ashift:SI (match_dup 0)
                  (match_operand:QI 2 "nonmemory_operand" "Ic"))
                (lshiftrt:SI (match_operand:SI 1 "register_operand" "r")
                  (minus:QI (const_int 32) (match_dup 2)))))
   (clobber (reg:CC FLAGS_REG))]
doesn't correctly describe what the instructions do if operands[2] is zero,
because 32 - 0 is an out of bounds shift.


More information about the Gcc-bugs mailing list