public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32
@ 2021-11-25  3:37 hjl.tools at gmail dot com
  2021-11-25  4:10 ` [Bug middle-end/103419] " hjl.tools at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2021-11-25  3:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103419
           Summary: FAIL: gcc.target/i386/pr102566-10b.c with -mx32
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com
  Target Milestone: ---
            Target: x86-64

On Linux/x86-64, -mx32 fails the following tests:

FAIL: gcc.target/i386/pr102566-10b.c scan-assembler-not cmpxchg
FAIL: gcc.target/i386/pr102566-10b.c scan-assembler-times lock;?[ \t]*btrq 1
FAIL: gcc.target/i386/pr102566-3b.c scan-assembler-not cmpxchg
FAIL: gcc.target/i386/pr102566-3b.c scan-assembler-times lock;?[ \t]*btsq 1

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

* [Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32
  2021-11-25  3:37 [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32 hjl.tools at gmail dot com
@ 2021-11-25  4:10 ` hjl.tools at gmail dot com
  2021-11-25  4:14 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2021-11-25  4:10 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
          Component|target                      |middle-end
   Last reconfirmed|                            |2021-11-25

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
(match (nop_atomic_bit_test_and_p @0 @1 @4)
 (bit_and (convert?@4 (ATOMIC_FETCH_OR_XOR_N @2 INTEGER_CST@0 @3))
           INTEGER_CST@1)
 (with {
         int ibit = tree_log2 (@0);
         int ibit2 = tree_log2 (@1);
       }
  (if (ibit == ibit2
      && ibit >= 0
      && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2))))))

(match (nop_atomic_bit_test_and_p @0 @1 @3)
 (bit_and (convert?@3 (SYNC_FETCH_OR_XOR_N @2 INTEGER_CST@0))
          INTEGER_CST@1)
 (with {
         int ibit = tree_log2 (@0);
         int ibit2 = tree_log2 (@1);
       }
  (if (ibit == ibit2
      && ibit >= 0
      && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2))))))

(match (nop_atomic_bit_test_and_p @0 @0 @4)
 (bit_and:c
  (convert1?@4
   (ATOMIC_FETCH_OR_XOR_N @2 (nop_convert? (lshift@0 integer_onep@5 @6)) @3))
  (convert2? @0))
 (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2)))))

(match (nop_atomic_bit_test_and_p @0 @0 @4)
 (bit_and:c
  (convert1?@4
   (SYNC_FETCH_OR_XOR_N @2 (nop_convert? (lshift@0 integer_onep@3 @5))))
  (convert2? @0))
 (if (TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@2)))))

are wrong. Here "type" is an integer type.  But TREE_TYPE (@2) is a pointer
type.  We should compare 2 integer types, not an integer type and a pointer
types.

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

* [Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32
  2021-11-25  3:37 [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32 hjl.tools at gmail dot com
  2021-11-25  4:10 ` [Bug middle-end/103419] " hjl.tools at gmail dot com
@ 2021-11-25  4:14 ` hjl.tools at gmail dot com
  2021-11-25  4:18 ` crazylht at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2021-11-25  4:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 51871
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51871&action=edit
A patch

Hongtao, please take a look.

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

* [Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32
  2021-11-25  3:37 [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32 hjl.tools at gmail dot com
  2021-11-25  4:10 ` [Bug middle-end/103419] " hjl.tools at gmail dot com
  2021-11-25  4:14 ` hjl.tools at gmail dot com
@ 2021-11-25  4:18 ` crazylht at gmail dot com
  2021-11-26  0:59 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2021-11-25  4:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to H.J. Lu from comment #2)
> Created attachment 51871 [details]
> A patch
> 
> Hongtao, please take a look.

Yes, i'll use type of second parameter which should be integer type.


582DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_4,
583                  "__atomic_fetch_or_4",
584                  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)

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

* [Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32
  2021-11-25  3:37 [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32 hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2021-11-25  4:18 ` crazylht at gmail dot com
@ 2021-11-26  0:59 ` cvs-commit at gcc dot gnu.org
  2021-11-26  1:03 ` crazylht at gmail dot com
  2021-11-26  1:03 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-26  0:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:379be00f45f65e0e8de72a50553dd9d2bab6cc08

commit r12-5535-g379be00f45f65e0e8de72a50553dd9d2bab6cc08
Author: liuhongt <hongtao.liu@intel.com>
Date:   Thu Nov 25 13:51:57 2021 +0800

    Fix typo in r12-5486.

    gcc/ChangeLog:

            PR middle-end/103419
            * match.pd: Fix typo, use the type of second parameter, not
            first one.

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

* [Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32
  2021-11-25  3:37 [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32 hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2021-11-26  0:59 ` cvs-commit at gcc dot gnu.org
@ 2021-11-26  1:03 ` crazylht at gmail dot com
  2021-11-26  1:03 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2021-11-26  1:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
Fixed in GCC12.

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

* [Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32
  2021-11-25  3:37 [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32 hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2021-11-26  1:03 ` crazylht at gmail dot com
@ 2021-11-26  1:03 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-26  1:03 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |12.0

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

end of thread, other threads:[~2021-11-26  1:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25  3:37 [Bug middle-end/103419] New: FAIL: gcc.target/i386/pr102566-10b.c with -mx32 hjl.tools at gmail dot com
2021-11-25  4:10 ` [Bug middle-end/103419] " hjl.tools at gmail dot com
2021-11-25  4:14 ` hjl.tools at gmail dot com
2021-11-25  4:18 ` crazylht at gmail dot com
2021-11-26  0:59 ` cvs-commit at gcc dot gnu.org
2021-11-26  1:03 ` crazylht at gmail dot com
2021-11-26  1:03 ` pinskia 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).