public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111668] New: vrp2 introduces invalid wide Boolean values
@ 2023-10-02 22:14 kristerw at gcc dot gnu.org
  2023-10-02 22:28 ` [Bug tree-optimization/111668] vrp2 (match and simplify) introduces invalid wide signed " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: kristerw at gcc dot gnu.org @ 2023-10-02 22:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111668
           Summary: vrp2 introduces invalid wide Boolean values
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kristerw at gcc dot gnu.org
  Target Milestone: ---

The vrp2 pass introduces an invalid wide Boolean when compiling the function

  int *a, b, c, d;
  void
  foo (void)
  {
    for (; d <= 0; d++)
      b &= ((a || d) ^ c) == 1;
  }

What is happening is that vrp2 changes the IR

  _Bool _16;
  <signed-boolean:32> _66;

  gimple_assign <cond_expr, _66, _16, -1, 0>

to the incorrect

  _Bool _16;
  <signed-boolean:32> _38;
  <signed-boolean:32> _66;

  gimple_assign <nop_expr, _38, _16, NULL, NULL>
  gimple_assign <negate_expr, _66, _38, NULL, NULL>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-05-13 11:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-02 22:14 [Bug tree-optimization/111668] New: vrp2 introduces invalid wide Boolean values kristerw at gcc dot gnu.org
2023-10-02 22:28 ` [Bug tree-optimization/111668] vrp2 (match and simplify) introduces invalid wide signed " pinskia at gcc dot gnu.org
2023-10-02 22:30 ` pinskia at gcc dot gnu.org
2023-10-02 22:32 ` [Bug tree-optimization/111668] [12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-10-03  8:33 ` jakub at gcc dot gnu.org
2023-10-03  8:48 ` jakub at gcc dot gnu.org
2023-10-04  7:29 ` cvs-commit at gcc dot gnu.org
2023-10-04  7:33 ` [Bug tree-optimization/111668] [12/13 " jakub at gcc dot gnu.org
2023-10-04  9:45 ` rguenth at gcc dot gnu.org
2023-10-08 21:41 ` kristerw at gcc dot gnu.org
2023-11-27 23:22 ` kristerw at gcc dot gnu.org
2024-05-13 11:30 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).