public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/109048] [13 regression] redundant mask compare generated by vectorizer.
Date: Tue, 07 Mar 2023 06:22:06 +0000	[thread overview]
Message-ID: <bug-109048-4-Ax1XaYs3iB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109048-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
A three-operand phi make ifcvt generate worse code

 <bb 4> [local count: 10737414]:
  # iftmp.1_16 = PHI <2.5e-1(13), 5.0e-1(2)>
  # iftmp.0_34 = PHI <4.0e+0(13), 2.0e+0(2)>
  # prephitmp_40 = PHI <-2.5e-1(13), -5.0e-1(2)>
  # prephitmp_41 = PHI <1.25e+0(13), 1.5e+0(2)>
  # prephitmp_42 = PHI <-1.25e+0(13), -1.5e+0(2)>
  # DEBUG f1 => NULL
  # DEBUG f2 => iftmp.1_16
  # DEBUG BEGIN_STMT
  # DEBUG i => 0
  # DEBUG BEGIN_STMT
  if (_3 != 0)
    goto <bb 28>; [50.00%]
  else
    goto <bb 29>; [50.00%]

  <bb 29> [local count: 5368707]:

  <bb 17> [local count: 531502204]:
  # i_18 = PHI <0(29), i_47(26)>
  # ivtmp_15 = PHI <256(29), ivtmp_43(26)>
  # DEBUG i => i_18
  # DEBUG BEGIN_STMT
  _38 = (long unsigned int) i_18;
  _37 = _38 * 4;
  _36 = af_24(D) + _37;
  x_20 = *_36;
  # DEBUG x => x_20
  # DEBUG BEGIN_STMT
  # DEBUG D#1 => x_20 < 0.0
  # DEBUG z => (int) D#1
  # DEBUG BEGIN_STMT
  if (x_20 >= 0.0)
    goto <bb 19>; [59.00%]
  else
    goto <bb 22>; [41.00%]

  <bb 19> [local count: 313586303]:
  if (x_20 < iftmp.0_34)
    goto <bb 22>; [20.00%]
  else
    goto <bb 21>; [80.00%]

  <bb 21> [local count: 250869041]:

  <bb 22> [local count: 531502205]:
  # prephitmp_17 = PHI <2.0e+0(17), prephitmp_41(19), iftmp.1_16(21)>
  # DEBUG t1 => D#2
  # DEBUG BEGIN_STMT
  # DEBUG neg_t1 => -D#2
  # DEBUG BEGIN_STMT
  # DEBUG t2 => prephitmp_17
  # DEBUG BEGIN_STMT
  _12 = res_28(D) + _37;
  _26 = *_12;
  _27 = _26 + x_20;
  _45 = prephitmp_17 + _27;
  *_12 = _45;
  # DEBUG BEGIN_STMT
  i_47 = i_18 + 1;
  # DEBUG i => i_47
  # DEBUG BEGIN_STMT
  ivtmp_43 = ivtmp_15 - 1;
  if (ivtmp_43 != 0)

  parent reply	other threads:[~2023-03-07  6:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07  6:01 [Bug tree-optimization/109048] New: " crazylht at gmail dot com
2023-03-07  6:03 ` [Bug tree-optimization/109048] " crazylht at gmail dot com
2023-03-07  6:13 ` crazylht at gmail dot com
2023-03-07  6:22 ` crazylht at gmail dot com [this message]
2023-03-07  6:34 ` crazylht at gmail dot com
2023-03-07  9:17 ` rguenth at gcc dot gnu.org
2023-03-07  9:38 ` jakub at gcc dot gnu.org
2023-03-07 10:09 ` rguenther at suse dot de
2023-03-27  8:26 ` rguenth at gcc dot gnu.org
2023-03-27  9:18 ` rguenth at gcc dot gnu.org
2023-03-27 10:37 ` rguenth at gcc dot gnu.org
2023-03-28 12:20 ` rguenth at gcc dot gnu.org
2023-04-13  7:30 ` rguenth at gcc dot gnu.org
2023-04-13  8:14 ` crazylht at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109048-4-Ax1XaYs3iB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).