public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>,
	Richard Biener <rguenther@suse.de>,
	       Jeff Law <law@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Patch ping (Re: [PATCH] Fix x86 bzhi/bextr iff zero_extract with zero size is undefined (PR rtl-optimization/87817))
Date: Wed, 21 Nov 2018 10:20:00 -0000	[thread overview]
Message-ID: <20181121101959.GJ11625@tucnak> (raw)
In-Reply-To: <20181113233702.GI11625@tucnak>

Hi!

On Wed, Nov 14, 2018 at 12:37:02AM +0100, Jakub Jelinek wrote:
> 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR rtl-optimization/87817
> 	* config/i386/i386.md (nmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
> 	*bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
> 	in the pattern to avoid triggering UB when operands[2] is zero.
> 	(tbm_bextri_<mode>): New expander.  Renamed the old define_insn to ...
> 	(*tbm_bextri_<mode>): ... this.

I'd like to ping this patch, while the folding committed for the PR
often triggers and so the RTL passes see literal zero propagated there less
often, e.g. the testcase with:
-O2 -mbmi2 -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre -fno-tree-pre -fno-tree-vrp -fno-tree-dominator-opts -fno-code-hoisting
is still miscompiled and there could be other reasons why a zero appears
only after expansion.

From what I understood, the agreement was that zero_extract with 0 size
(either literal or just at runtime is incorrect in the middle-end).

	Jakub

  parent reply	other threads:[~2018-11-21 10:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 23:37 [PATCH] Fix x86 bzhi/bextr iff zero_extract with zero size is undefined (PR rtl-optimization/87817) Jakub Jelinek
2018-11-14  8:29 ` Richard Biener
2018-11-14  8:58   ` Jakub Jelinek
2018-11-14 12:21   ` [PATCH] Fold x86 bzhi with zero last operand " Jakub Jelinek
2018-11-14 12:28     ` Uros Bizjak
2018-11-14 12:38     ` Richard Biener
2018-11-21 10:20 ` Jakub Jelinek [this message]
2018-11-21 10:32   ` Patch ping (Re: [PATCH] Fix x86 bzhi/bextr iff zero_extract with zero size is undefined (PR rtl-optimization/87817)) Uros Bizjak

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=20181121101959.GJ11625@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=rguenther@suse.de \
    --cc=ubizjak@gmail.com \
    /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).