public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/101185] [12 Regression] pr96814.c failed after r12-1669 on non-avx512 platform
Date: Thu, 24 Jun 2021 09:12:50 +0000	[thread overview]
Message-ID: <bug-101185-4-ornvT6E3kG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101185-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Hongtao.liu from comment #9)
> (In reply to Jakub Jelinek from comment #8)
> > Yeah, ideally main including the cpuid check should be compiled with the
> > least possible target and if the check is successful call a noipa function
> > with the command line chosen attributes.
> > We've always been playing with fire here...
> 
> Yes, does this solution sound good to you, uros? If yes, please ignore my
> patch[1], I'll resend a new one.
> 
> [1]https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573591.html

I'm afraid the above proposed solution would shift the burden from the compiler
to the user, and the burden does not justify relatively minor and solvable
issue to use generic "a & b" on masks.

IMO, using VxBI modes offer clear path to solution; VxBI move patterns and
logic insns should be trivial to implement, whereas more "esoteric" operations,
like shifts, unpacks and arithmetic, need some more though, since they don't
operate on vectors.

Another issue with current implementation is with DImode logic operations on
masks for 32-bit targets. ATM, they are simply disabled, e.g.:

(define_insn "*<code><mode>_1"
  [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm,r,?k")
        (any_or:SWI248
         (match_operand:SWI248 1 "nonimmediate_operand" "%0,0,k")
         (match_operand:SWI248 2 "<general_operand>" "r<i>,m,k")))
   (clobber (reg:CC FLAGS_REG))]

where

;; Single word integer modes without QImode.
(define_mode_iterator SWI248 [HI SI (DI "TARGET_64BIT")])

Please also note that mask operations do not clobber flags

  parent reply	other threads:[~2021-06-24  9:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24  1:32 [Bug target/101185] New: pr96814 " crazylht at gmail dot com
2021-06-24  1:44 ` [Bug target/101185] " crazylht at gmail dot com
2021-06-24  1:52 ` crazylht at gmail dot com
2021-06-24  1:56 ` [Bug target/101185] pr96814.c " crazylht at gmail dot com
2021-06-24  6:01 ` ubizjak at gmail dot com
2021-06-24  6:44 ` [Bug target/101185] [12 Regression] " rguenth at gcc dot gnu.org
2021-06-24  7:08 ` ubizjak at gmail dot com
2021-06-24  7:14 ` crazylht at gmail dot com
2021-06-24  8:41 ` jakub at gcc dot gnu.org
2021-06-24  8:52 ` crazylht at gmail dot com
2021-06-24  9:12 ` ubizjak at gmail dot com [this message]
2021-06-24  9:18 ` crazylht at gmail dot com
2021-06-24  9:36 ` rguenth at gcc dot gnu.org
2021-06-24 12:13 ` hjl.tools at gmail dot com
2021-06-25  1:17 ` cvs-commit at gcc dot gnu.org
2021-07-14 12:10 ` cvs-commit at gcc dot gnu.org
2021-09-20  4:33 ` [Bug testsuite/101185] " pinskia at gcc dot gnu.org
2021-09-20  4:43 ` pinskia at gcc dot gnu.org
2021-09-20  4:47 ` [Bug target/101185] " pinskia at gcc dot gnu.org
2021-09-20  6:19 ` rguenther at suse dot de
2022-01-05  6:00 ` 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-101185-4-ornvT6E3kG@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).