[Bug target/115148] [SH] [12/13/14 Regression]: libcanberra fails with 'unaligned opcodes detected in executable segment'

2024-05-18 Thread olegendo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115148

Oleg Endo  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-05-19
 Ever confirmed|0   |1

--- Comment #3 from Oleg Endo  ---
In your attached libcanberra_la-read-vorbis.s I can spot the following
suspicious code:


.LBB70:
.loc 1 44 9 is_stmt 0
mova.L52,r0
.LVL48:
mov.b   @(r0,r2),r1
extu.b  r1,r1
.LVL49:
brafr1
nop

.

.L82:
.long   ca_vorbis_get_nchannels@PLT-(.LPCS10+2-.)
.L86:
.long   free@PLT-(.LPCS9+2-.)
.L87:
.long   ov_clear@PLT-(.LPCS11+2-.)
.align 2
.L52:
.byte   .L54-.L53
.byte   .L54-.L53
.byte   .L51-.L53
.align 1  (1)
.L54:
.LBE70:
.LBE72:   (2)
.loc 1 61 24
bra .L50
mov #-7,r9


In (1) a lookup table of 3 bytes is emitted.  Because of the following ".align
1" directive, the following code at (2) will be misaligned.

Can you please try to compile with -fverbose-asm  maybe it will give a
first hint as to where the problematic code comes from.

Results for 15.0.0 20240516 (experimental) [master revision gcc-15-647-ga6114c2a691] (GCC) testsuite on arm-unknown-eabi

2024-05-18 Thread ci_notify--- via Gcc-testresults
# From 
https://ci.linaro.org/job/tcwg_gnu_embed_check_gcc--master-thumb_v8a_hard_eabi-build/428/:
LAST_UPDATED: 2024-05-19T04:49:39+00:00 (master revision 
gcc-15-647-ga6114c2a691) arm-eabi 
{-mthumb/-march=armv8-a+simd/-mfpu=auto/-mfloat-abi=hard}

Target is arm-unknown-eabi
Host   is arm-unknown-eabi

=== libstdc++ tests ===


Running target qemu/-mthumb/-march=armv8-a+simd/-mfpu=auto/-mfloat-abi=hard
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++26 execution test
FAIL: 22_locale/ctype/scan/wchar_t/1.cc  -std=gnu++17 execution test
FAIL: 27_io/basic_filebuf/underflow/wchar_t/11603.cc  -std=gnu++17 execution 
test
FAIL: 27_io/basic_fstream/53984.cc  -std=gnu++17 execution test
FAIL: 27_io/print/2.cc  -std=gnu++23 (test for excess errors)
UNRESOLVED: 27_io/print/2.cc  -std=gnu++23 compilation failed to produce 
executable
FAIL: 27_io/print/2.cc  -std=gnu++26 (test for excess errors)
UNRESOLVED: 27_io/print/2.cc  -std=gnu++26 compilation failed to produce 
executable
FAIL: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++20 (test 
for excess errors)
UNRESOLVED: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++20 
compilation failed to produce executable
FAIL: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++26 (test 
for excess errors)
UNRESOLVED: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++26 
compilation failed to produce executable
FAIL: experimental/simd/pr109261_constexpr_simd.cc -ffast-math -O2 -Wno-psabi 
(test for excess errors)
XPASS: ext/stdio_filebuf/char/10063-2.cc  -std=gnu++17 execution test
XPASS: ext/stdio_filebuf/char/10063-3.cc  -std=gnu++17 execution test

=== libstdc++ Summary ===

# of expected passes15953
# of unexpected failures16
# of unexpected successes   2
# of expected failures  131
# of unresolved testcases   4
# of unsupported tests  1026
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target qemu/-mthumb/-march=armv8-a+simd/-mfpu=auto/-mfloat-abi=hard
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c expected multiline 
pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c expected multiline 
pattern lines 19-34
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c (test for excess errors)
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c 2 blank line(s) in output
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c expected multiline pattern 
lines 13-28
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 72)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 77)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 note (test for warnings, line 68)
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "= ABS_EXPR" 1
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "__builtin_copysign" 
1
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized ".COPYSIGN" 1
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized "ABS_EXPR" 1
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-ltrans-tree-dump-not optimized "Function bar"
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-wpa-ipa-dump icf "Equal symbols: 1"
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-wpa-ipa-dump icf "Semantic equality 
hit:foo/[0-9+]+->bar/[0-9+]+"
FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so 
(internal compiler error: in df_refs_verify, at df-scan.cc:4019)
FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so 
(test for excess errors)
FAIL: gcc.dg/torture/builtin-iseqsig-1.c   -Os  execution test
FAIL: gcc.dg/torture/builtin-iseqsig-2.c   -Os  execution test
FAIL: gcc.dg/torture/builtin-iseqsig-3.c   -Os  execution test
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= -" 1
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= .COPYSIGN" 2
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= ABS_EXPR" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = -" 4
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = ABS_EXPR <" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c 

Re: [PATCH v1] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC]

2024-05-18 Thread Andrew Pinski
On Sat, May 18, 2024, 9:17 PM  wrote:

> From: Pan Li 
>
> There are sorts of match pattern for SAT related cases,  there will be
> some duplicated code to check the dest, op_0, op_1 are same tree types.
> Aka ternary tree type matches.  Thus, extract one helper function to
> do this and avoid match code duplication.
>
> The below test suites are passed for this patch:
> * The rv64gcv fully regression test.
> * The x86 bootstrap test.
> * The x86 regression test.
>
> gcc/ChangeLog:
>
> * generic-match-head.cc (integer_types_ternary_match): New helper
> function to check tenary tree type matches or not.
> * gimple-match-head.cc (integer_types_ternary_match): Ditto but
> for match.
> * match.pd: Leverage above helper function to avoid code dup.
>
> Signed-off-by: Pan Li 
> ---
>  gcc/generic-match-head.cc | 17 +
>  gcc/gimple-match-head.cc  | 17 +
>  gcc/match.pd  | 25 +
>  3 files changed, 39 insertions(+), 20 deletions(-)
>
> diff --git a/gcc/generic-match-head.cc b/gcc/generic-match-head.cc
> index 0d3f648fe8d..cdd48c7a5cc 100644
> --- a/gcc/generic-match-head.cc
> +++ b/gcc/generic-match-head.cc
> @@ -59,6 +59,23 @@ types_match (tree t1, tree t2)
>return TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2);
>  }
>
> +/* Routine to determine if the types T1,  T2 and T3 are effectively
> +   the same integer type for GENERIC.  If T1,  T2 or T3 is not a type,
> +   the test applies to their TREE_TYPE.  */
> +
> +static inline bool
> +integer_types_ternary_match (tree t1, tree t2, tree t3)
> +{
> +  t1 = TYPE_P (t1) ? t1 : TREE_TYPE (t1);
> +  t2 = TYPE_P (t2) ? t2 : TREE_TYPE (t2);
> +  t3 = TYPE_P (t3) ? t3 : TREE_TYPE (t3);
> +
> +  if (!INTEGRAL_TYPE_P (t1) || !INTEGRAL_TYPE_P (t2) || !INTEGRAL_TYPE_P
> (t3))
> +return false;
> +
> +  return types_match (t1, t2) && types_match (t1, t3);
> +}
> +
>  /* Return if T has a single use.  For GENERIC, we assume this is
> always true.  */
>
> diff --git a/gcc/gimple-match-head.cc b/gcc/gimple-match-head.cc
> index 5f8a1a1ad8e..91f2e56b8ef 100644
> --- a/gcc/gimple-match-head.cc
> +++ b/gcc/gimple-match-head.cc
> @@ -79,6 +79,23 @@ types_match (tree t1, tree t2)
>return types_compatible_p (t1, t2);
>  }
>
> +/* Routine to determine if the types T1,  T2 and T3 are effectively
> +   the same integer type for GIMPLE.  If T1,  T2 or T3 is not a type,
> +   the test applies to their TREE_TYPE.  */
> +
> +static inline bool
> +integer_types_ternary_match (tree t1, tree t2, tree t3)
> +{
> +  t1 = TYPE_P (t1) ? t1 : TREE_TYPE (t1);
> +  t2 = TYPE_P (t2) ? t2 : TREE_TYPE (t2);
> +  t3 = TYPE_P (t3) ? t3 : TREE_TYPE (t3);
> +
> +  if (!INTEGRAL_TYPE_P (t1) || !INTEGRAL_TYPE_P (t2) || !INTEGRAL_TYPE_P
> (t3))
> +return false;
> +
> +  return types_match (t1, t2) && types_match (t1, t3);
> +}
> +
>  /* Return if T has a single use.  For GIMPLE, we also allow any
> non-SSA_NAME (ie constants) and zero uses to cope with uses
> that aren't linked up yet.  */
> diff --git a/gcc/match.pd b/gcc/match.pd
> index 0f9c34fa897..b291e34bbe4 100644
> --- a/gcc/match.pd
> +++ b/gcc/match.pd
> @@ -3046,38 +3046,23 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
>  /* Unsigned Saturation Add */
>  (match (usadd_left_part_1 @0 @1)
>   (plus:c @0 @1)
> - (if (INTEGRAL_TYPE_P (type)
> -  && TYPE_UNSIGNED (TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@1)
> + (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0,
> @1
>


Even though unsigned might be the cheaper check, you might need to swap the
order back to where it was so you check integral first.

Otherwise this is nice cleanup. (Note I can't approve it though).

Thanks,
Andrew


>  (match (usadd_left_part_2 @0 @1)
>   (realpart (IFN_ADD_OVERFLOW:c @0 @1))
> - (if (INTEGRAL_TYPE_P (type)
> -  && TYPE_UNSIGNED (TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@1)
> + (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0,
> @1
>
>  (match (usadd_right_part_1 @0 @1)
>   (negate (convert (lt (plus:c @0 @1) @0)))
> - (if (INTEGRAL_TYPE_P (type)
> -  && TYPE_UNSIGNED (TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@1)
> + (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0,
> @1
>
>  (match (usadd_right_part_1 @0 @1)
>   (negate (convert (gt @0 (plus:c @0 @1
> - (if (INTEGRAL_TYPE_P (type)
> -  && TYPE_UNSIGNED (TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@0))
> -  && types_match (type, TREE_TYPE (@1)
> + (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0,
> @1
>
>  (match (usadd_right_part_2 @0 @1)
>   (negate (convert (ne (imagpart (IFN_ADD_OVERFLOW:c @0 @1))
> integer_zerop)))
> - (if (INTEGRAL_TYPE_P (type)
> -  && 

[PATCH v1] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC]

2024-05-18 Thread pan2 . li
From: Pan Li 

There are sorts of match pattern for SAT related cases,  there will be
some duplicated code to check the dest, op_0, op_1 are same tree types.
Aka ternary tree type matches.  Thus, extract one helper function to
do this and avoid match code duplication.

The below test suites are passed for this patch:
* The rv64gcv fully regression test.
* The x86 bootstrap test.
* The x86 regression test.

gcc/ChangeLog:

* generic-match-head.cc (integer_types_ternary_match): New helper
function to check tenary tree type matches or not.
* gimple-match-head.cc (integer_types_ternary_match): Ditto but
for match.
* match.pd: Leverage above helper function to avoid code dup.

Signed-off-by: Pan Li 
---
 gcc/generic-match-head.cc | 17 +
 gcc/gimple-match-head.cc  | 17 +
 gcc/match.pd  | 25 +
 3 files changed, 39 insertions(+), 20 deletions(-)

diff --git a/gcc/generic-match-head.cc b/gcc/generic-match-head.cc
index 0d3f648fe8d..cdd48c7a5cc 100644
--- a/gcc/generic-match-head.cc
+++ b/gcc/generic-match-head.cc
@@ -59,6 +59,23 @@ types_match (tree t1, tree t2)
   return TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2);
 }
 
+/* Routine to determine if the types T1,  T2 and T3 are effectively
+   the same integer type for GENERIC.  If T1,  T2 or T3 is not a type,
+   the test applies to their TREE_TYPE.  */
+
+static inline bool
+integer_types_ternary_match (tree t1, tree t2, tree t3)
+{
+  t1 = TYPE_P (t1) ? t1 : TREE_TYPE (t1);
+  t2 = TYPE_P (t2) ? t2 : TREE_TYPE (t2);
+  t3 = TYPE_P (t3) ? t3 : TREE_TYPE (t3);
+
+  if (!INTEGRAL_TYPE_P (t1) || !INTEGRAL_TYPE_P (t2) || !INTEGRAL_TYPE_P (t3))
+return false;
+
+  return types_match (t1, t2) && types_match (t1, t3);
+}
+
 /* Return if T has a single use.  For GENERIC, we assume this is
always true.  */
 
diff --git a/gcc/gimple-match-head.cc b/gcc/gimple-match-head.cc
index 5f8a1a1ad8e..91f2e56b8ef 100644
--- a/gcc/gimple-match-head.cc
+++ b/gcc/gimple-match-head.cc
@@ -79,6 +79,23 @@ types_match (tree t1, tree t2)
   return types_compatible_p (t1, t2);
 }
 
+/* Routine to determine if the types T1,  T2 and T3 are effectively
+   the same integer type for GIMPLE.  If T1,  T2 or T3 is not a type,
+   the test applies to their TREE_TYPE.  */
+
+static inline bool
+integer_types_ternary_match (tree t1, tree t2, tree t3)
+{
+  t1 = TYPE_P (t1) ? t1 : TREE_TYPE (t1);
+  t2 = TYPE_P (t2) ? t2 : TREE_TYPE (t2);
+  t3 = TYPE_P (t3) ? t3 : TREE_TYPE (t3);
+
+  if (!INTEGRAL_TYPE_P (t1) || !INTEGRAL_TYPE_P (t2) || !INTEGRAL_TYPE_P (t3))
+return false;
+
+  return types_match (t1, t2) && types_match (t1, t3);
+}
+
 /* Return if T has a single use.  For GIMPLE, we also allow any
non-SSA_NAME (ie constants) and zero uses to cope with uses
that aren't linked up yet.  */
diff --git a/gcc/match.pd b/gcc/match.pd
index 0f9c34fa897..b291e34bbe4 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -3046,38 +3046,23 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
 /* Unsigned Saturation Add */
 (match (usadd_left_part_1 @0 @1)
  (plus:c @0 @1)
- (if (INTEGRAL_TYPE_P (type)
-  && TYPE_UNSIGNED (TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@1)
+ (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0, @1
 
 (match (usadd_left_part_2 @0 @1)
  (realpart (IFN_ADD_OVERFLOW:c @0 @1))
- (if (INTEGRAL_TYPE_P (type)
-  && TYPE_UNSIGNED (TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@1)
+ (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0, @1
 
 (match (usadd_right_part_1 @0 @1)
  (negate (convert (lt (plus:c @0 @1) @0)))
- (if (INTEGRAL_TYPE_P (type)
-  && TYPE_UNSIGNED (TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@1)
+ (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0, @1
 
 (match (usadd_right_part_1 @0 @1)
  (negate (convert (gt @0 (plus:c @0 @1
- (if (INTEGRAL_TYPE_P (type)
-  && TYPE_UNSIGNED (TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@1)
+ (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0, @1
 
 (match (usadd_right_part_2 @0 @1)
  (negate (convert (ne (imagpart (IFN_ADD_OVERFLOW:c @0 @1)) integer_zerop)))
- (if (INTEGRAL_TYPE_P (type)
-  && TYPE_UNSIGNED (TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@0))
-  && types_match (type, TREE_TYPE (@1)
+ (if (TYPE_UNSIGNED (type) && integer_types_ternary_match (type, @0, @1
 
 /* We cannot merge or overload usadd_left_part_1 and usadd_left_part_2
because the sub part of left_part_2 cannot work with right_part_1.
-- 
2.34.1



[to-be-committed][RISC-V][PR target/115142] Do not create invalidate shift-add insn

2024-05-18 Thread Jeff Law

Repost, this time with the RISC-V tag so it's picked up by the CI system.

This fixes a minor bug that showed up in the CI system, presumably with 
fuzz testing.


Under the right circumstances, we could end trying to emit a shift-add 
style sequence where the to-be-shifted operand was not a register.  This 
naturally leads to an unrecognized insn.


The circumstances which triggered this weren't something that should 
appear in the wild (-ftree-ter, without optimization enabled).  So I 
wasn't planning to backport.  Obviously if it shows up in another 
context we can revisit that decision.


PR target/115142
gcc/

* config/riscv/riscv.cc (mem_shadd_or_shadd_rtx_p): Make sure
shifted argument is a register.

gcc/testsuite

* gcc.target/riscv/pr115142.c: New test.

I've run this through my rv32gcv and rv64gc tester.  Waiting on the CI 
system before committing.


jeff
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 7a34b4be873..d0c22058b8c 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -2465,6 +2465,7 @@ mem_shadd_or_shadd_rtx_p (rtx x)
 {
   return ((GET_CODE (x) == ASHIFT
   || GET_CODE (x) == MULT)
+ && register_operand (XEXP (x, 0), GET_MODE (x))
  && CONST_INT_P (XEXP (x, 1))
  && ((GET_CODE (x) == ASHIFT && IN_RANGE (INTVAL (XEXP (x, 1)), 1, 3))
  || (GET_CODE (x) == MULT
diff --git a/gcc/testsuite/gcc.target/riscv/pr115142.c 
b/gcc/testsuite/gcc.target/riscv/pr115142.c
new file mode 100644
index 000..40ba49dfa20
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr115142.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -ftree-ter" } */
+
+long a;
+char b;
+void e() {
+  char f[8][1];
+  b = f[a][a];
+}
+


Results for 15.0.0 20240516 (experimental) [remotes/origin/master r15-647-ga6114c2a691] (GCC) testsuite on pru-unknown-elf

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun May 19 03:21:32 UTC 2024 (revision r15-647-ga6114c2a691)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c expected multiline 
pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c expected multiline 
pattern lines 19-34
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c (test for excess errors)
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c 2 blank line(s) in output
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c expected multiline pattern 
lines 13-28
FAIL: c-c++-common/pr103798-2.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-3.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-4.c  -Wc++-compat   scan-assembler-not memchr
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/c23-nullptr-1.c (test for excess errors)
UNRESOLVED: gcc.dg/c23-nullptr-1.c compilation failed to produce executable
FAIL: gcc.dg/gnu23-tag-composite-1.c  (test for errors, line 43)
FAIL: gcc.dg/gnu23-tag-composite-1.c (test for excess errors)
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_7.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_8.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_9.c scan-tree-dump-times store-merging "Merging 
successful" 2
WARNING: gcc.dg/torture/pr112305.c   -O0  execution test program timed out.
FAIL: gcc.dg/torture/pr112305.c   -O0  execution test
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  [(char *)] = "
FAIL: gcc.dg/tree-ssa/if-to-switch-1.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-10.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: 

Results for 15.0.0 20240516 (experimental) [master revision gcc-15-647-ga6114c2a691] (GCC) testsuite on armv8l-unknown-linux-gnueabihf

2024-05-18 Thread ci_notify--- via Gcc-testresults
# From https://ci.linaro.org/job/tcwg_gcc_check--master-arm-build/2131/:
LAST_UPDATED: 2024-05-19T03:07:23+00:00 (master revision 
gcc-15-647-ga6114c2a691) armv8l-unknown-linux-gnueabihf

Native configuration is armv8l-unknown-linux-gnueabihf

=== libatomic tests ===


Running target tcwg-local

=== libatomic Summary ===

# of expected passes44
# of unsupported tests  5
=== libgomp tests ===


Running target tcwg-local
XPASS: libgomp.c/alloc-pinned-1.c execution test
XPASS: libgomp.c/alloc-pinned-2.c execution test
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)

=== libgomp Summary ===

# of expected passes16097
# of unexpected failures8
# of unexpected successes   2
# of expected failures  284
# of unsupported tests  705
=== libitm tests ===


Running target tcwg-local

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libstdc++ tests ===


Running target tcwg-local
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++26 execution test

=== libstdc++ Summary ===

# of expected passes18313
# of unexpected failures8
# of expected failures  126
# of unsupported tests  768
=== gcc tests ===


Running target tcwg-local
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 72)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 77)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 note (test for warnings, line 68)
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "= ABS_EXPR" 1
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "__builtin_copysign" 
1
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized ".COPYSIGN" 1
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized "ABS_EXPR" 1
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION 

Results for 15.0.0 20240517 (experimental) [master 9bd0b709ddb70589436c326142b1566f49f5e979] (GCC) testsuite on sparc-sun-solaris2.11

2024-05-18 Thread Rainer Orth
LAST_UPDATED: Fri May 17 08:59:50 UTC 2024 (revision 
9bd0b709ddb70589436c326142b1566f49f5e979)

=== acats tests ===
FAIL:   cxa4001

=== acats Summary ===
# of expected passes2327
# of unexpected failures1
Native configuration is sparc-sun-solaris2.11

=== g++ tests ===


Running target unix
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  gcov: 12 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 14: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 21: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 37: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 43: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 48: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 53: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 58: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 63: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 68: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 73: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 78: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  gcov: 12 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 14: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 21: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 37: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 43: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 48: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 53: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 58: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 63: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 68: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 73: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 78: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  gcov: 12 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 14: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 21: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 37: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 43: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 48: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 53: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 58: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 63: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 68: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 73: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 78: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++98  gcov: 1 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++98  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  gcov: 6 failures in line counts, 0 
in branch percentages, 0 in condition/decision, 0 in return percentages, 0 in 
intermediate format
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 15: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 22: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 24: is #:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 38: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 44: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 49: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  gcov: 6 failures in line counts, 0 
in branch percentages, 0 in condition/decision, 0 in return percentages, 0 in 
intermediate format
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  line 15: is 3:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  line 22: is 3:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  line 24: is #:should 

Results for 13.2.1 20240516 [remotes/origin/releases/gcc-13 r13-8777-g162c441c946] (GCC) testsuite on pru-unknown-elf

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun May 19 02:59:15 UTC 2024 (revision r13-8777-g162c441c946)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: c-c++-common/pr103798-2.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-3.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-4.c  -Wc++-compat   scan-assembler-not memchr
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/c2x-nullptr-1.c (test for excess errors)
UNRESOLVED: gcc.dg/c2x-nullptr-1.c compilation failed to produce executable
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_7.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_8.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_9.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20)
FAIL: gcc-dg-lto-pr113359-2-01.exe scan-wpa-ipa-dump icf "Semantic equality 
hit:geta/.*getb/"
FAIL: gcc.dg/lto/pr113359-2 c_lto_pr113359-2_0.o assemble, -O2 -flto 
-fno-strict-aliasing -fno-ipa-cp  --disable-tree-esra -fdump-ipa-icf-details 
FAIL: gcc.dg/lto/pr113359-2 c_lto_pr113359-2_0.o-c_lto_pr113359-2_1.o execute 
-O2 -flto -fno-strict-aliasing -fno-ipa-cp  --disable-tree-esra 
-fdump-ipa-icf-details 
FAIL: gcc.dg/tree-ssa/ctz-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  [(char *)] = "
FAIL: gcc.dg/tree-ssa/if-to-switch-1.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-10.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: 

Results for 15.0.0 20240516 (experimental) [master r15-645-g988838da722] (GCC) testsuite on s390x-ibm-linux-gnu arch14

2024-05-18 Thread stefansf--- via Gcc-testresults
LAST_UPDATED: Sat May 18 17:04:49 UTC 2024 (revision r15-645-g988838da722)

=== acats tests ===
FAIL:   cb1010a
FAIL:   cxa4001

=== acats Summary ===
# of expected passes2326
# of unexpected failures2
Native configuration is s390x-ibm-linux-gnu arch14

=== gcc tests ===


Running target unix/-m31
FAIL: gcc.c-torture/execute/920501-4.c   -O1  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O2  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -Os  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O1  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O2  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -Os  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O2  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -Os  execution test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O0  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O1  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -Os  output pattern test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O0  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O1  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O3 -g  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -Os  execution test
FAIL: c-c++-common/asan/pr64820.c   -O0  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O1  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -Os  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O0  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O1  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -Os  output pattern test
FAIL: c-c++-common/vector-subscript-4.c  -Wc++-compat   scan-tree-dump-not 
optimized "vector"
FAIL: gcc.dg/auto-init-uninit-17.c unconditional (test for warnings, line 14)
FAIL: gcc.dg/gcc-have-sync-compare-and-swap.c (test for excess errors)
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg"
FAIL: gcc.dg/sms-compare-debug-1.c (test for excess errors)
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/uninit-17.c unconditional (test for warnings, line 14)
FAIL: c-c++-common/goacc/firstprivate-mappings-1.c scan-tree-dump omplower 
"(?n)#pragma omp target oacc_parallel map(from:array_so [len: 

[Bug tree-optimization/115154] [13 Regression] wrong code at optimization levels -O2, -O3, -Os

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115154

--- Comment #3 from Andrew Pinski  ---
I wonder if my r13-7434-g682bbd364708fe exposed the issue.
And then r14-3432-gddd64a6ec3b38e "fixed" it (on accident).

[Bug tree-optimization/115154] [13 Regression] wrong code at optimization levels -O2, -O3, -Os

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115154

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||13.1.0, 14.1.0
   Keywords||needs-bisection
   Target Milestone|--- |13.3
  Known to fail||13.2.0

--- Comment #2 from Andrew Pinski  ---
It was caused by something that was backported to GCC 13 for GCC 13.2.0 too.
It works in GCC 14.1.0 and the trunk for me.

Results for 13.2.1 20240516 [remotes/origin/releases/gcc-13 r13-8777-g162c441c946] (GCC) testsuite on pru-unknown-elf

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun May 19 02:36:56 UTC 2024 (revision r13-8777-g162c441c946)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: c-c++-common/pr103798-2.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-3.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-4.c  -Wc++-compat   scan-assembler-not memchr
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/c2x-nullptr-1.c (test for excess errors)
UNRESOLVED: gcc.dg/c2x-nullptr-1.c compilation failed to produce executable
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_7.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_8.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_9.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/uninit-pred-9_b.c bogus warning (test for bogus messages, line 20)
FAIL: gcc-dg-lto-pr113359-2-01.exe scan-wpa-ipa-dump icf "Semantic equality 
hit:geta/.*getb/"
FAIL: gcc.dg/lto/pr113359-2 c_lto_pr113359-2_0.o assemble, -O2 -flto 
-fno-strict-aliasing -fno-ipa-cp  --disable-tree-esra -fdump-ipa-icf-details 
FAIL: gcc.dg/lto/pr113359-2 c_lto_pr113359-2_0.o-c_lto_pr113359-2_1.o execute 
-O2 -flto -fno-strict-aliasing -fno-ipa-cp  --disable-tree-esra 
-fdump-ipa-icf-details 
FAIL: gcc.dg/tree-ssa/ctz-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  [(char *)] = "
FAIL: gcc.dg/tree-ssa/if-to-switch-1.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-10.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: 

[Bug tree-optimization/115154] [13 Regression] wrong code at optimization levels -O2, -O3, -Os

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115154

Andrew Pinski  changed:

   What|Removed |Added

Summary|[13/14 Regression] wrong|[13 Regression] wrong code
   |code at optimization levels |at optimization levels -O2,
   |-O2, -O3, -Os   |-O3, -Os

--- Comment #1 from Andrew Pinski  ---
This is fixed in GCC 14. I think it was one of my match.pd patches and it might
be backported already to the GCC 13 branch. Let me look.

[Bug tree-optimization/115154] New: [13/14 Regression] wrong code at optimization levels -O2, -O3, -Os

2024-05-18 Thread bic60176 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115154

Bug ID: 115154
   Summary: [13/14 Regression] wrong code at optimization levels
-O2, -O3, -Os
   Product: gcc
   Version: 13.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bic60176 at gmail dot com
  Target Milestone: ---

Created attachment 58242
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58242=edit
testcase

OS: Ubuntu 22.04.3 LTS

We found that there are discrepancies when compiling with gcc-13.2.0,
gcc-14.1.0 at optimization levels -O2, -O3, and -Os.

$ ../compiler-builds/gcc-13.2.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s
-I/home/csmith/include/csmith-2.3.0 -O2 testcase.c -o exec

$ timeout 1s ./exec 2>exec.err
f.b=0

$ ../compiler-builds/gcc-12.3.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s
-I/home/csmith/include/csmith-2.3.0 -O2 testcase.c -o exec

$ timeout 1s ./exec 2>exec.err
f.b=-1

[Bug tree-optimization/115144] [15 Regression] 2% performance regression for some codes with r15-518-g99b1daae18c095

2024-05-18 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115144

--- Comment #5 from Hans-Peter Nilsson  ---
Created attachment 58241
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58241=edit
tree-dump file@518 w. ivopts

As above @518 without -fno-ivopts

[Bug tree-optimization/115144] [15 Regression] 2% performance regression for some codes with r15-518-g99b1daae18c095

2024-05-18 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115144

--- Comment #4 from Hans-Peter Nilsson  ---
Created attachment 58240
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58240=edit
tree-dump file@517 w. ivopts

As above @517, but no -fno-ivopts

[Bug sanitizer/115127] [12/13/14/15 Regression] passing zero to __builtin_ctz() check missing

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115127

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |UNCONFIRMED
 Ever confirmed|1   |0

Results for 12.3.1 20240516 [remotes/origin/releases/gcc-12 r12-10458-g65e5547e546] (GCC) testsuite on pru-unknown-elf

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun May 19 02:14:36 UTC 2024 (revision r12-10458-g65e5547e546)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O0  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O1  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O3 -g  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -Os  (test for excess errors)
FAIL: gcc.dg/debug/btf/btf-bitfields-1.c scan-assembler-times [\\t 
]0x1340[\\t ]+[^\\n]*btm_offset 1
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 19)
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 20)
FAIL: c-c++-common/auto-init-7.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT (8, 2, &"temp4""
FAIL: c-c++-common/auto-init-8.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT (8, 1, &"temp4""
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
FAIL: gcc.dg/Warray-bounds-48-novec.c (test for excess errors)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 27)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 28)
FAIL: gcc.dg/Wno-frame-address.c (test for excess errors)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/builtin-object-size-20.c scan-tree-dump-not optimized "fail"
FAIL: gcc.dg/c11-align-4.c  (test for errors, line 9)
FAIL: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "__mulsc3" 1
FAIL: gcc.dg/complex-7.c scan-tree-dump-times cplxlower1 "__muldc3" 1
FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg"
FAIL: gcc.dg/mallign.c (test for excess errors)
FAIL: gcc.dg/memchr.c (test for excess errors)
UNRESOLVED: gcc.dg/memchr.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/memcmp-3.c (test for excess errors)
UNRESOLVED: gcc.dg/memcmp-3.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr46647.c scan-tree-dump-not optimized "memset"
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace 

[Bug tree-optimization/115144] [15 Regression] 2% performance regression for some codes with r15-518-g99b1daae18c095

2024-05-18 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115144

--- Comment #3 from Hans-Peter Nilsson  ---
Created attachment 58239
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58239=edit
tree-dump file @518

arith-rand.c @r15-518
compiled with -fno-ivopts -fdump-tree-optimized -march=v10 -O2

[Bug tree-optimization/115144] [15 Regression] 2% performance regression for some codes with r15-518-g99b1daae18c095

2024-05-18 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115144

--- Comment #2 from Hans-Peter Nilsson  ---
Created attachment 58238
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58238=edit
tree-dump file@517

arith-rand.c @r15-517
compiled with -fno-ivopts -fdump-tree-optimized -march=v10 -O2

[Bug tree-optimization/115144] [15 Regression] 2% performance regression for some codes with r15-518-g99b1daae18c095

2024-05-18 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115144

--- Comment #1 from Hans-Peter Nilsson  ---
I also ran a round compiled with -fno-ivopts -fno-delayed-branch: the latter
because it's somewhat non-linear in finding delay-slot-filling opportunities
(lack of "luck" causing improvements to negate) and the former because it was
mentioned in the commit as similarly messing things up.

That "fixed" all of the performance drop for random_bitstring, but still left
an almost-as-large performance drop in main in
gcc.c-torture/execute/arith-rand-ll.c. IOW, the net performance drop is 1.25%:

r15-0517:
Basic clock cycles, total @: 13662157

r15-0518:
Basic clock cycles, total @: 13832953

The focus of this bug was the on subset of arith-rand-ll.c that is in
gcc.target/cris/pr93372-47.c (i.e. no main function), so if I keep that, the
gist of this PR should instead shift to something like 50% "r15-518 doesn't
play nice with ivopts" but I guess that's already known.

So if anyone's interested in improving r15-518 (but not in ivopts interaction),
I'd suggest that'd be in what happens in the main function for
gcc.c-torture/execute/arith-rand-ll.c.

Having said that, I did compile gcc.target/cris/pr93372-47.c adding -fno-ivopts
-fdump-tree-optimized and it shows that the tot_bits computation ("tot_bits_13
= tot_bits_8 + n_bits_12;") is moved later, right before it's used in a
conditional, which makes me think the delay-branch-scheduling has less
"material" to fill the first delays-slots.

I also compiled gcc.c-torture/execute/arith-rand-ll.c with -fno-ivopts
-fdump-tree-optimized (plus the usual -O2 -march=v10) and will attach the
tree-dump files.  They show what the pr93372-47.c change *and* that several
division operations are moved forward.  This separates them from the modulus
opterations on the same values, so I guess targets where computing these values
together is a win (not CRIS), we'll see a performance loss.

[Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23)

2024-05-18 Thread luigighiron at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109

--- Comment #4 from Halalaluyafail3  ---
(In reply to Halalaluyafail3 from comment #3)
> enum E { a = 1L, b = _Generic(a, enum E: 2) }; /* { dg-warning "outside the 
> range" } */
Seems like I copied this wrong, the comment should be a part of the first
quote.

Results for 11.4.1 20240516 [remotes/origin/releases/gcc-11 revision dde786aa4ea:3884987b630:b5348964bdd1b710a624111c04816410b1de5b9e] (GCC) testsuite on pru-unknown-elf

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Sun May 19 01:54:35 UTC 2024 (revision 
dde786aa4ea:3884987b630:b5348964bdd1b710a624111c04816410b1de5b9e)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O0  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O1  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -O3 -g  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/pr51628-30.c   -Os  (test for excess errors)
FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not (DIE 
(0x([0-9a-f]*)) DW_TAG_lexical_block)[^#/!@;|]*[#/!@;|]+ 
+[^(].*DW_TAG_lexical_block)[^#/!@;|x]*x1[^#/!@;|]*[#/!@;|] 
+DW_AT_abstract_origin
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 19)
FAIL: c-c++-common/Wcast-align.c  -Wc++-compat   (test for warnings, line 20)
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
FAIL: gcc.dg/Warray-bounds-48.c (test for excess errors)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 27)
FAIL: gcc.dg/Wattributes-8.c  (test for bogus messages, line 28)
FAIL: gcc.dg/Wno-frame-address.c (test for excess errors)
XPASS: gcc.dg/Wstringop-overflow-43.c pr? (test for warnings, line 172)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/builtin-object-size-20.c scan-tree-dump-not optimized "fail"
FAIL: gcc.dg/c11-align-4.c  (test for errors, line 9)
FAIL: gcc.dg/complex-6.c scan-tree-dump-times cplxlower1 "__mulsc3" 1
FAIL: gcc.dg/complex-7.c scan-tree-dump-times cplxlower1 "__muldc3" 1
FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"
FAIL: gcc.dg/loop-8.c scan-rtl-dump-not loop2_invariant "without introducing a 
new temporary register"
FAIL: gcc.dg/loop-8.c scan-rtl-dump-times loop2_invariant "Decided" 1
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg"
FAIL: gcc.dg/mallign.c (test for excess errors)
FAIL: gcc.dg/memchr.c (test for excess errors)
UNRESOLVED: gcc.dg/memchr.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/memcmp-3.c (test for excess errors)
UNRESOLVED: gcc.dg/memcmp-3.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr46647.c scan-tree-dump-not optimized "memset"
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1

Results for 15.0.0 20240516 (experimental) [remotes/origin/master r15-647-ga6114c2a691] (GCC) testsuite on avr-unknown-none

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun May 19 01:31:24 UTC 2024 (revision r15-647-ga6114c2a691)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/execute/conversion.c   -O0  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O0  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O1  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/pr64242.c   -Os  execution test
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O0 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O1 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O2 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkd.c compilation,  -Os 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O0 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O1 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O2 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -O3 -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -Og -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkd.c execution,  -Os 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O0 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O1 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O2 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkf.c compilation,  -Os 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O0 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O1 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O2 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -O3 -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -Og -g 
UNRESOLVED: gcc.c-torture/execute/ieee/cdivchkf.c execution,  -Os 
FAIL: gcc.c-torture/execute/ieee/fp-cmp-3.c execution,  -O0 
FAIL: gcc.c-torture/execute/ieee/fp-cmp-3.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O0 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O2 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O2 -flto 
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/ieee/pr108540-1.c execution,  -Os 
FAIL: c-c++-common/analyzer/allocation-size-pr113654-1.c (test for excess 
errors)
FAIL: c-c++-common/analyzer/allocation-size-pr113654-1.c PR analyzer/113654 
(test for bogus messages, line 46)
FAIL: c-c++-common/analyzer/flex-without-call-summaries.c  (test for warnings, 
line 882)

[Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23)

2024-05-18 Thread luigighiron at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109

--- Comment #3 from Halalaluyafail3  ---
(In reply to uecker from comment #2)
> PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652093.html

I'm confused about the tests added here:

> enum H { x = 1 };
> enum H { x = 2UL + UINT_MAX };
Shouldn't this be a constraint violation if unsigned long is wide than
unsigned?

> If two declarations of the same type have a member-declaration or
> enumerator-list, one shall not be nested within the other and both
> declarations shall fulfill all requirements of compatible types (6.2.7)
> with the additional requirement that corresponding members of structure or
> union types shall have the same (and not merely compatible) types.
Section 6.7.3.4 "Tags" Paragraph 1 N3220

I don't see anything that would require a conversion to int here, nor would I
expect this to be the intent. It should just have the same value and the type
will end up the same as in the previous declaration.

> enum E { a = 1L, b = 2 };
> enum E { a = 1L, b = _Generic(a, enum E: 2) }; /* { dg-warning "outside the 
> range" } */
This just seems to be testing if int is compatible with enum E. Which from
testing on godbolt is false on GCC since it would pick for enum E to be
compatible with unsigned. This test also doesn't seem related to the problem
which was having the types of the integral constant expressions for a be
different types.

[Bug sanitizer/115127] [12/13/14/15 Regression] passing zero to __builtin_ctz() check missing

2024-05-18 Thread bic60176 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115127

--- Comment #3 from Bi6c  ---
Created attachment 58237
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58237=edit
preprocessed source file

RE: [PATCH] Add widening expansion of MULT_HIGHPART_EXPR for integral modes

2024-05-18 Thread Li, Pan2
Hi Botcazou,

Just notice that this patch may result in some ICE when build libc++ for the 
riscv port, details as below.
Please note not all configuration can reproduce this issue, feel free to ping 
me if you cannot reproduce this issue. CC more riscv port people for awareness.

during GIMPLE pass: slp
In file included from 
/home/box/panli/gnu-toolchain/gcc/libstdc++-v3/src/c++17/floating_to_chars.cc:124:
/home/box/panli/gnu-toolchain/gcc/libstdc++-v3/src/c++17/ryu/generic_128.c: In 
function 'int 
{anonymous}::ryu::generic128::generic_to_chars(floating_decimal_128, char*)':
/home/box/panli/gnu-toolchain/gcc/libstdc++-v3/src/c++17/ryu/generic_128.c:251:5:
 internal compiler error: in require, at machmode.h:313
  251 | int generic_to_chars(const struct floating_decimal_128 v, char* const 
result) {
  | ^~~~
0x30d526b diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char 
const*, __va_list_tag (*) [1], diagnostic_t)
???:0
0x30d637e internal_error(char const*, ...)
???:0
0xdd9c9d fancy_abort(char const*, int, char const*)
???:0
0xbb4f9f can_mult_highpart_p(machine_mode, bool) [clone .cold]
???:0
0x17384b3 default_preferred_div_as_shifts_over_mult(tree_node const*)
???:0
0x2b34967 vect_recog_divmod_pattern(vec_info*, _stmt_vec_info*, tree_node**)
???:0
0x2b2f106 vect_pattern_recog_1(vec_info*, vect_recog_func*, _stmt_vec_info*)
???:0
0x2b2f3b1 vect_pattern_recog(vec_info*)
???:0
0x1a5e403 vect_slp_region(vec, 
vec, vec*, unsigned 
int, loop*)
???:0
0x1a60505 vect_slp_bbs(vec const&, loop*)
???:0
0x1a608f3 vect_slp_function(function*)
???:0
0x1a6c2a1 (anonymous namespace)::pass_slp_vectorize::execute(function*)
???:0
Please submit a full bug report, with preprocessed source (by using 
-freport-bug).
Please include the complete backtrace with any bug report.

Pan

-Original Message-
From: Eric Botcazou  
Sent: Tuesday, April 30, 2024 12:11 AM
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Add widening expansion of MULT_HIGHPART_EXPR for integral modes

Hi,

for integral modes, the expansion of MULT_HIGHPART_EXPR requires the presence 
of an {s,u}mul_highpart optab whereas, for vector modes, widening expansion is
supported.  This adds a widening expansion for integral modes too, which is in 
fact already implemented in expmed_mult_highpart_optab.  We'll use that in a 
subsequent change to the Ada front-end to generate fast modulo reduction for 
modular types with nonbinary modulus (a little controversial Ada 95 feature).

Tested on x86-64/Linux, OK for the mainline?

2024-04-29  Eric Botcazou  

* expmed.h (expmed_mult_highpart_optab): Declare.
* expmed.cc (expmed_mult_highpart_optab): Remove static keyword.
Do not assume that OP1 is a constant integer.  Fix pasto.
(expmed_mult_highpart): Pass OP1 narrowed to MODE in all the calls
to expmed_mult_highpart_optab.
* optabs-query.cc (can_mult_highpart_p): Use 2 for integer widening
and shift subsequent values accordingly.
* optabs.cc (expand_mult_highpart): Call expmed_mult_highpart_optab
when can_mult_highpart_p returns 2 and adjust to above change.

-- 
Eric Botcazou


Results for 13.2.1 20240516 [remotes/origin/releases/gcc-13 r13-8777-g162c441c946] (GCC) testsuite on avr-unknown-none

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun May 19 01:08:31 UTC 2024 (revision r13-8777-g162c441c946)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O0   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O0  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O1   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O1  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O3 -g   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -Os   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/pr103813.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O1  (test for excess 

Results for 13.2.1 20240516 [releases/gcc-13 r13-8777-g162c441c94] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-18 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:162c441c9462d073c53dde87258898795bf28a5c
gcc-descr r13-8777-g162c441c9462d0

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sun May 19 00:14:01 UTC 2024 (revision r13-8777-g162c441c94)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++2b (test for excess errors)

=== g++ Summary for unix/-m32 ===

# of expected passes226116
# of unexpected failures2
# of expected failures  1929
# of unsupported tests  10898

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes235068
# of expected failures  1937
# of unsupported tests  11086

=== g++ Summary ===

# of expected passes461184
# of unexpected failures2
# of expected failures  3866
# of unsupported tests  21984
/home/gccbuild/build/nightly/build-gcc-13/gcc/xg++  version 13.2.1 20240516 
[releases/gcc-13 r13-8777-g162c441c94] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/ipa-sra-1.c   -O0  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c   -O1  -DPREVENT_OPTIMIZATION  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 15 k == 3
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg4 == 4
FAIL: 

Results for 13.2.1 20240516 [releases/gcc-13 r13-8777-g162c441c94] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-18 Thread Bill Seurer (POWER8) via Gcc-testresults


git commit g:162c441c9462d073c53dde87258898795bf28a5c
gcc-descr r13-8777-g162c441c9462d0

power8
Linux 5.4.0-177-generic ppc64le
GNU Make 4.2.1

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May 18 23:43:34 UTC 2024 (revision r13-8777-g162c441c94)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 29)
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
FAIL: gcc.dg/guality/inline-params-2.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/ipa-sra-1.c   -O0  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c   -O1  -DPREVENT_OPTIMIZATION  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 15 k == 3
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 *x == (char) 25
FAIL: gcc.dg/guality/pr36728-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i == 37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i1 == 2 * 
37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i2 == 3 * 
37
XPASS: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 j == 28 
+ 37
FAIL: gcc.dg/guality/pr41447-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr41447-1.c   -Os  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr54200.c   -O1  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -Os  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 

[Bug target/115153] [14/15 Regression] Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread rudi at heitbaum dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

--- Comment #7 from rudi at heitbaum dot com ---
(In reply to Andrew Pinski from comment #6)
> I suspect r14-4365-g0731889c026bfe is the cause.
> 
> ```
>  (define_insn "arm_atomic_loaddi2_ldrd"
>[(set (match_operand:DI 0 "register_operand" "=r")
> (unspec_volatile:DI
> - [(match_operand:DI 1 "arm_sync_memory_operand" "Q")]
> + [(match_operand:DI 1 "memory_operand" "m")]
> VUNSPEC_LDRD_ATOMIC))]
>"ARM_DOUBLEWORD_ALIGN && TARGET_HAVE_LPAE"
> -  "ldrd%?\t%0, %H0, %C1"
> -  [(set_attr "predicable" "yes")])
> +  "ldrd\t%0, %H0, %1"
> +)
> ```
> 
> Most likely that should have been `ldrd_strd_offset_operand/Do` . There
> might be other places in that patch which made the same mistake too.

I can confirm that reverting
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=0731889c026bfe;hp=bada3c27d855430af736de51439ce275cffda754
allows for the successful compile of both libsanitizer and kodi.

Results for 13.2.1 20240516 [remotes/origin/releases/gcc-13 r13-8777-g162c441c946] (GCC) testsuite on avr-unknown-none

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun May 19 00:45:33 UTC 2024 (revision r13-8777-g162c441c946)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O0   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O0  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O1   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O1  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O3 -g   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -Os   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__(?:gnu_)?divdc3"
FAIL: gcc.c-torture/compile/pr103813.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr108892.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O1  (test for excess 

[Bug target/115153] [14/15 Regression] Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

Andrew Pinski  changed:

   What|Removed |Added

Summary|Error: bad immediate value  |[14/15 Regression] Error:
   |for 8-bit offset - armv7ve  |bad immediate value for
   ||8-bit offset - armv7ve
 Status|WAITING |NEW
   Target Milestone|--- |14.2

--- Comment #6 from Andrew Pinski  ---
I suspect r14-4365-g0731889c026bfe is the cause.

```
 (define_insn "arm_atomic_loaddi2_ldrd"
   [(set (match_operand:DI 0 "register_operand" "=r")
(unspec_volatile:DI
- [(match_operand:DI 1 "arm_sync_memory_operand" "Q")]
+ [(match_operand:DI 1 "memory_operand" "m")]
VUNSPEC_LDRD_ATOMIC))]
   "ARM_DOUBLEWORD_ALIGN && TARGET_HAVE_LPAE"
-  "ldrd%?\t%0, %H0, %C1"
-  [(set_attr "predicable" "yes")])
+  "ldrd\t%0, %H0, %1"
+)
```

Most likely that should have been `ldrd_strd_offset_operand/Do` . There might
be other places in that patch which made the same mistake too.

Results for 12.3.1 20240516 [remotes/origin/releases/gcc-12 r12-10458-g65e5547e546] (GCC) testsuite on avr-unknown-none

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun May 19 00:22:54 UTC 2024 (revision r12-10458-g65e5547e546)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O0   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O0  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O1   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O1  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -O3 -g   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/compile/asmgoto-6.c   -Os   scan-assembler my asm 
FAIL: gcc.c-torture/compile/asmgoto-6.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O0   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O1   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O2   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -O3 -g   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/attr-complex-method-2.c   -Os   scan-tree-dump 
optimized "__divdc3"
FAIL: gcc.c-torture/compile/pr103813.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none 

[Bug target/115153] Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread rudi at heitbaum dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

--- Comment #5 from rudi at heitbaum dot com ---
(In reply to rudi from comment #4)
> We have also see the same failure building kodi (vpeter4 did the
> investigation) 
> The difference between gcc13 and 14 is
> 
> gcc-13, ok
>   add r0, r0, #384
>   ldrdr2, r3, [r0]
> 
> gcc-14, not ok
>   dmb ish
>   ldrdr2, r3, [r0, #384]
> 
> The kodi issue is at - https://github.com/xbmc/xbmc/issues/25221

This was when we built a working gcc (we compiled it without libsanitizer)

[Bug target/115153] Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread rudi at heitbaum dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

--- Comment #4 from rudi at heitbaum dot com ---
We have also see the same failure building kodi (vpeter4 did the investigation) 
The difference between gcc13 and 14 is

gcc-13, ok
add r0, r0, #384
ldrdr2, r3, [r0]

gcc-14, not ok
dmb ish
ldrdr2, r3, [r0, #384]

The kodi issue is at - https://github.com/xbmc/xbmc/issues/25221

Results for 11.4.1 20240516 [remotes/origin/releases/gcc-11 revision dde786aa4ea:3884987b630:b5348964bdd1b710a624111c04816410b1de5b9e] (GCC) testsuite on avr-unknown-none

2024-05-18 Thread The GnuPru BuildBot via Gcc-testresults
WARNING: Many C++ failures have been omitted due to lack of libstdc++ on AVR!
Only G++ regressions are reported below.


LAST_UPDATED: Sun May 19 00:00:23 UTC 2024 (revision 
dde786aa4ea:3884987b630:b5348964bdd1b710a624111c04816410b1de5b9e)

Target is avr-unknown-none
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target atmega128-sim
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-2.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/asmgoto-5.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr103813.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr96426.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98096.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O0  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/pr98199.c   -Os  (test for excess errors)
FAIL: gcc.c-torture/execute/conversion.c   -O0  execution test
FAIL: gcc.c-torture/execute/pr108498-2.c   -O0  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr108498-2.c   -O0  compilation failed to 
produce executable
FAIL: gcc.c-torture/execute/pr108498-2.c   -O1  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr108498-2.c   -O1  compilation failed to 
produce executable
FAIL: gcc.c-torture/execute/pr108498-2.c   -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr108498-2.c   -O2  compilation failed to 
produce executable
FAIL: gcc.c-torture/execute/pr108498-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr108498-2.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  compilation failed to produce 
executable
FAIL: gcc.c-torture/execute/pr108498-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr108498-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  compilation failed to produce executable
FAIL: gcc.c-torture/execute/pr108498-2.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr108498-2.c   -O3 -g  compilation failed to 
produce executable
FAIL: gcc.c-torture/execute/pr108498-2.c   -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr108498-2.c   

[Bug target/115153] Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread rudi at heitbaum dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

--- Comment #3 from rudi at heitbaum dot com ---
(In reply to Andrew Pinski from comment #1)
> What is your exact configure command line?

Executing (host):
/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/configure
--host=x86_64-linux-gnu --build=x86_64-linux-gnu
--prefix=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain
--bindir=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/bin
--sbindir=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/sbin
--sysconfdir=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/etc
--libexecdir=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/lib
--localstatedir=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/var
--disable-static --enable-shared --target=armv7ve-libreelec-linux-gnueabihf
--with-sysroot=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/sysroot
--with-gmp=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain
--with-mpfr=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain
--with-mpc=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain
--with-zstd=/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain
--with-gnu-as --with-gnu-ld --enable-plugin --enable-lto --enable-gold
--enable-ld=default --with-linker-hash-style=gnu --disable-multilib
--disable-nls --enable-checking=release --without-ppl --without-cloog
--disable-libada --disable-libmudflap --disable-libitm --disable-libquadmath
--disable-libgomp --disable-libmpx --disable-libssp --enable-__cxa_atexit
--enable-languages=c,c++ --enable-libatomic --enable-decimal-float --enable-tls
--enable-shared --disable-static --enable-long-long --enable-threads=posix
--disable-libstdcxx-pch --enable-libstdcxx-time --enable-clocale=gnu
--with-abi=aapcs-linux --with-arch=armv7ve --with-float=hard
--with-fpu=neon-vfpv4

[Bug target/115153] Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
 Ever confirmed|0   |1
   Last reconfirmed||2024-05-19

--- Comment #2 from Andrew Pinski  ---
Also can you attach the preprocessed source? and add -v to gcc command line to
provide the exact command line which is causing the error?

[Bug target/115153] Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

--- Comment #1 from Andrew Pinski  ---
What is your exact configure command line?

Results for 15.0.0 20240516 (experimental) [master r15-647-ga6114c2a69] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-18 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:a6114c2a691112f9cf5b072c21685d2e43c76d81
gcc-descr r15-647-ga6114c2a691112

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May 18 22:39:28 UTC 2024 (revision r15-647-ga6114c2a69)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: c-c++-common/torture/strub-run3.c   -O0  execution test

=== g++ Summary for unix/-m32 ===

# of expected passes251796
# of unexpected failures1
# of expected failures  2615
# of unsupported tests  11567

Running target unix/-m64
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O0  (internal 
compiler error: in require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O0  (test for excess 
errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-17.c   -O0  compilation 
failed to produce executable
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O2  (internal 
compiler error: in require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O2  (test for excess 
errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-17.c   -O2  compilation 
failed to produce executable
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  (internal compiler error: in 
require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  (test for excess errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-17.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  compilation failed to produce 
executable
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  (internal compiler error: in require, 
at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-17.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-17.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce 
executable
FAIL: c-c++-common/torture/builtin-arith-overflow-18.c   -O0  (internal 
compiler error: in require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-18.c   -O0  (test for excess 
errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-18.c   -O0  compilation 
failed to produce executable
FAIL: c-c++-common/torture/builtin-arith-overflow-18.c   -O2  (internal 
compiler error: in require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-18.c   -O2  (test for excess 
errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-18.c   -O2  compilation 
failed to produce executable
FAIL: c-c++-common/torture/builtin-arith-overflow-18.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  (internal compiler error: in 
require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-18.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  (test for excess errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-18.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  compilation failed to produce 
executable
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O0  (internal compiler 
error: in require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O0  (test for excess 
errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-6.c   -O0  compilation 
failed to produce executable
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O2  (internal compiler 
error: in require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O2  (test for excess 
errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-6.c   -O2  compilation 
failed to produce executable
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  (internal compiler error: in 
require, at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  (test for excess errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-6.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  compilation failed to produce 
executable
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  (internal compiler error: in require, 
at machmode.h:313)
FAIL: c-c++-common/torture/builtin-arith-overflow-6.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: c-c++-common/torture/builtin-arith-overflow-6.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce 
executable
FAIL: 

[Bug sanitizer/115153] New: Error: bad immediate value for 8-bit offset - armv7ve

2024-05-18 Thread rudi at heitbaum dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115153

Bug ID: 115153
   Summary: Error: bad immediate value for 8-bit offset - armv7ve
   Product: gcc
   Version: 14.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rudi at heitbaum dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

When compiling libsanitizer or kodi with a target of armv7ve an assembly
failure occurs, this failure does not occur the armv7a target (nor on 64bit
targets)

Below is the snippet of the failure

/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/.x86_64-linux-gnu/./gcc/xgcc
-shared-libgcc
-B/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/.x86_64-linux-gnu/./gcc
-nostdinc++
-L/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/.x86_64-linux-gnu/armv7ve-libreelec-linux-gnueabihf/libstdc++-v3/src
-L/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/.x86_64-linux-gnu/armv7ve-libreelec-linux-gnueabihf/libstdc++-v3/src/.libs
-L/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/.x86_64-linux-gnu/armv7ve-libreelec-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
-B/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/bin/
-B/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/lib/
-isystem
/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/include
-isystem
/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/sys-include
   -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_NEEDS_SEGV=1
-DCAN_SANITIZE_UB=0 -DASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION=0
-DHAVE_AS_SYM_ASSIGN=1  -I.
-I/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/libsanitizer/asan
-I..  -I
/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/libsanitizer/include
-I
/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/libsanitizer
 -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC
-fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables
-fvisibility=hidden -Wno-variadic-macros -fno-ipa-icf
-I../../libstdc++-v3/include
-I../../libstdc++-v3/include/armv7ve-libreelec-linux-gnueabihf
-I/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/libsanitizer/../libstdc++-v3/libsupc++
-std=gnu++14  -g -O2 -D_GNU_SOURCE -MT asan_preinit.o -MD -MP -MF
.deps/asan_preinit.Tpo -c -o asan_preinit.o
/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/libsanitizer/asan/asan_preinit.cpp
mv -f .deps/asan_descriptions.Tpo .deps/asan_descriptions.Plo
/var/media/DATA/home-rudi/LibreELEC.kernel11/build.LibreELEC-RPi2.arm-12.0-devel/build/gcc-14.1.0/libsanitizer/asan/asan_thread.h:192:8:
warning: ISO C++ forbids flexible array member 'start_data_' [-Wpedantic]
  192 |   char start_data_[];
  |^~~
mv -f .deps/asan_interceptors_vfork.Tpo .deps/asan_interceptors_vfork.Plo
mv -f .deps/asan_suppressions.Tpo .deps/asan_suppressions.Plo
mv -f .deps/asan_preinit.Tpo .deps/asan_preinit.Po
cp asan_preinit.o libasan_preinit.o
mv -f .deps/asan_errors.Tpo .deps/asan_errors.Plo
/tmp/ccorxrMD.s: Assembler messages:
/tmp/ccorxrMD.s:523: Error: bad immediate value for 8-bit offset (272)
/tmp/ccorxrMD.s:682: Error: bad immediate value for 8-bit offset (272)
/tmp/ccorxrMD.s:1122: Error: bad immediate value for 8-bit offset (272)
/tmp/ccorxrMD.s:1460: Error: bad immediate value for 8-bit offset (272)
/tmp/ccorxrMD.s:2140: Error: bad immediate value for 8-bit offset (568)
/tmp/ccorxrMD.s:2293: Error: bad immediate value for 8-bit offset (568)
/tmp/ccorxrMD.s:2550: Error: bad immediate value for 8-bit offset (568)
/tmp/ccorxrMD.s:2726: Error: bad immediate value for 8-bit offset (568)
/tmp/ccorxrMD.s:2888: Error: bad immediate value for 8-bit offset (272)
/tmp/ccorxrMD.s:3077: Error: bad immediate value for 8-bit offset (272)
/tmp/ccorxrMD.s:3352: Error: bad immediate value for 8-bit offset (272)
/tmp/ccorxrMD.s:3493: Error: bad immediate value for 8-bit offset (272)
make[4]: *** [Makefile:661: asan_stats.lo] Error 1

Results for 15.0.0 20240516 (experimental) [master revision gcc-15-647-ga6114c2a691] (GCC) testsuite on arm-unknown-eabi

2024-05-18 Thread ci_notify--- via Gcc-testresults
# From 
https://ci.linaro.org/job/tcwg_gnu_embed_check_gcc--master-thumb_m23_soft_eabi-build/27/:
LAST_UPDATED: 2024-05-18T23:10:58+00:00 (master revision 
gcc-15-647-ga6114c2a691) arm-eabi 
{-mthumb/-march=armv8-m.base/-mtune=cortex-m23/-mfloat-abi=soft/-mfpu=auto}

Target is arm-unknown-eabi
Host   is arm-unknown-eabi

=== libstdc++ tests ===


Running target 
qemu/-mthumb/-march=armv8-m.base/-mtune=cortex-m23/-mfloat-abi=soft/-mfpu=auto
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++26 execution test
FAIL: 22_locale/ctype/scan/wchar_t/1.cc  -std=gnu++17 execution test
FAIL: 27_io/basic_filebuf/underflow/wchar_t/11603.cc  -std=gnu++17 execution 
test
FAIL: 27_io/basic_fstream/53984.cc  -std=gnu++17 execution test
FAIL: 27_io/print/2.cc  -std=gnu++23 (test for excess errors)
UNRESOLVED: 27_io/print/2.cc  -std=gnu++23 compilation failed to produce 
executable
FAIL: 27_io/print/2.cc  -std=gnu++26 (test for excess errors)
UNRESOLVED: 27_io/print/2.cc  -std=gnu++26 compilation failed to produce 
executable
FAIL: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++20 (test 
for excess errors)
UNRESOLVED: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++20 
compilation failed to produce executable
FAIL: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++26 (test 
for excess errors)
UNRESOLVED: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++26 
compilation failed to produce executable
XPASS: ext/stdio_filebuf/char/10063-2.cc  -std=gnu++17 execution test
XPASS: ext/stdio_filebuf/char/10063-3.cc  -std=gnu++17 execution test

=== libstdc++ Summary ===

# of expected passes15949
# of unexpected failures15
# of unexpected successes   2
# of expected failures  131
# of unresolved testcases   4
# of unsupported tests  1025
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target 
qemu/-mthumb/-march=armv8-m.base/-mtune=cortex-m23/-mfloat-abi=soft/-mfpu=auto
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c expected multiline 
pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c expected multiline 
pattern lines 19-34
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c (test for excess errors)
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c 2 blank line(s) in output
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c expected multiline pattern 
lines 13-28
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 72)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 77)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 note (test for warnings, line 68)
FAIL: gcc.dg/auto-init-uninit-17.c unconditional (test for warnings, line 14)
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3
FAIL: gcc.dg/uninit-17.c unconditional (test for warnings, line 14)
FAIL: gcc.dg/ipa/iinline-attr.c scan-ipa-dump inline "hooray[^n]*inline 
copy in test"
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-ltrans-tree-dump-not optimized "Function bar"
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-wpa-ipa-dump icf "Equal symbols: 1"
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-wpa-ipa-dump icf "Semantic equality 
hit:foo/[0-9+]+->bar/[0-9+]+"
FAIL: gcc.dg/torture/pr113026-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions   (test for bogus messages, line 10)
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.misc-tests/gcov-pr94029.c gcov failed: spawn failed
FAIL: gcc.target/arm/acle/data-intrinsics-assembly.c   -O0   
check-function-bodies test_cls
FAIL: gcc.target/arm/acle/data-intrinsics-assembly.c   -O0   
check-function-bodies test_cls_mem
FAIL: gcc.target/arm/acle/data-intrinsics-assembly.c   -O0   
check-function-bodies test_clsl
FAIL: gcc.target/arm/acle/data-intrinsics-assembly.c   -O0   
check-function-bodies test_clsl_mem
FAIL: gcc.target/arm/acle/data-intrinsics-assembly.c   -O0   
check-function-bodies test_clz
FAIL: gcc.target/arm/acle/data-intrinsics-assembly.c   -O0   
check-function-bodies test_clz_mem
FAIL: 

Results for 15.0.0 20240516 (experimental) [remotes/origin/HEAD r15-647-ga6114c2a69] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-18 Thread Bill Seurer (POWER8) via Gcc-testresults


git commit g:a6114c2a691112f9cf5b072c21685d2e43c76d81
gcc-descr r15-647-ga6114c2a691112

power8
Linux 5.4.0-177-generic ppc64le
GNU Make 4.2.1

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May 18 21:17:13 UTC 2024 (revision r15-647-ga6114c2a69)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 32)
FAIL: gcc.dg/pr82274-2.c (internal compiler error: in require, at 
machmode.h:313)
FAIL: gcc.dg/pr82274-2.c (test for excess errors)
UNRESOLVED: gcc.dg/pr82274-2.c compilation failed to produce executable
FAIL: gcc.dg/pr85414.c (internal compiler error: in require, at machmode.h:313)
FAIL: gcc.dg/pr85414.c (test for excess errors)
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
FAIL: gcc.dg/guality/inline-params-2.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 *x == (char) 25
FAIL: gcc.dg/guality/pr36728-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i == 37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i1 == 2 * 
37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i2 == 3 * 
37
XPASS: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 j == 28 
+ 37
FAIL: gcc.dg/guality/pr41447-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr41447-1.c   -Os  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr54200.c   -O1  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -Os  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 

[Bug target/115146] [15 Regression] Incorrect 8-byte vectorization: psrlw/psraw confusion

2024-05-18 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115146

--- Comment #9 from Sergei Trofimovich  ---
(In reply to Levy Hsu from comment #7)
> Created attachment 58236 [details]
> [PR]115146

The change fixed `highway-1.0.7` testsuite failure for me.

[Bug tree-optimization/115143] [11/12/13/14/15 Regression] tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115143

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||patch
URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2024-May/652
   ||095.html

--- Comment #10 from Andrew Pinski  ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652095.html

[PATCH] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-05-18 Thread Andrew Pinski
The problem here is even if last_and_only_stmt returns a statement,
the bb might still contain a phi node which defines a ssa name
which is used in that statement so we need to add a check to make sure
that the phi nodes are empty for the middle bbs in both the
`CMP?MINMAX:MINMAX` case and the `CMP?MINMAX:B` cases.

OK for trunk and backport to all open branches since r14-3827-g30e6ee074588ba 
was backported?
Bootstrapped and tested on x86_64_linux-gnu with no regressions.

PR tree-optimization/115143

gcc/ChangeLog:

* tree-ssa-phiopt.cc (minmax_replacement): Check for empty
phi nodes for middle bbs for the case where middle bb is not empty.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr115143-1.c: New test.
* gcc.c-torture/compile/pr115143-2.c: New test.
* gcc.c-torture/compile/pr115143-3.c: New test.

Signed-off-by: Andrew Pinski 
---
 .../gcc.c-torture/compile/pr115143-1.c| 21 +
 .../gcc.c-torture/compile/pr115143-2.c| 30 +++
 .../gcc.c-torture/compile/pr115143-3.c| 29 ++
 gcc/tree-ssa-phiopt.cc| 12 
 4 files changed, 92 insertions(+)
 create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr115143-1.c
 create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr115143-2.c
 create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr115143-3.c

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr115143-1.c 
b/gcc/testsuite/gcc.c-torture/compile/pr115143-1.c
new file mode 100644
index 000..5cb119ea432
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr115143-1.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/115143 */
+/* This used to ICE.
+   minmax part of phiopt would transform,
+   would transform `a!=0?min(a, b) : 0` into `min(a,b)`
+   which was correct except b was defined by a phi in the inner
+   bb which was not handled. */
+short a, d;
+char b;
+long c;
+unsigned long e, f;
+void g(unsigned long h) {
+  if (c ? e : b)
+if (e)
+  if (d) {
+a = f ? ({
+  unsigned long i = d ? f : 0, j = e ? h : 0;
+  i < j ? i : j;
+}) : 0;
+  }
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr115143-2.c 
b/gcc/testsuite/gcc.c-torture/compile/pr115143-2.c
new file mode 100644
index 000..05c3bbe9738
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr115143-2.c
@@ -0,0 +1,30 @@
+/* { dg-options "-fgimple" } */
+/* PR tree-optimization/115143 */
+/* This used to ICE.
+   minmax part of phiopt would transform,
+   would transform `a!=0?min(a, b) : 0` into `min(a,b)`
+   which was correct except b was defined by a phi in the inner
+   bb which was not handled. */
+unsigned __GIMPLE (ssa,startwith("phiopt"))
+foo (unsigned a, unsigned b)
+{
+  unsigned j;
+  unsigned _23;
+  unsigned _12;
+
+  __BB(2):
+  if (a_6(D) != 0u)
+goto __BB3;
+  else
+goto __BB4;
+
+  __BB(3):
+  j_10 = __PHI (__BB2: b_11(D));
+  _23 = __MIN (a_6(D), j_10);
+  goto __BB4;
+
+  __BB(4):
+  _12 = __PHI (__BB3: _23, __BB2: 0u);
+  return _12;
+
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr115143-3.c 
b/gcc/testsuite/gcc.c-torture/compile/pr115143-3.c
new file mode 100644
index 000..53c5fb5588e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr115143-3.c
@@ -0,0 +1,29 @@
+/* { dg-options "-fgimple" } */
+/* PR tree-optimization/115143 */
+/* This used to ICE.
+   minmax part of phiopt would transform,
+   would transform `a!=0?min(a, b) : 0` into `min(a,b)`
+   which was correct except b was defined by a phi in the inner
+   bb which was not handled. */
+unsigned __GIMPLE (ssa,startwith("phiopt"))
+foo (unsigned a, unsigned b)
+{
+  unsigned j;
+  unsigned _23;
+  unsigned _12;
+
+  __BB(2):
+  if (a_6(D) > 0u)
+goto __BB3;
+  else
+goto __BB4;
+
+  __BB(3):
+  j_10 = __PHI (__BB2: b_7(D));
+  _23 = __MIN (a_6(D), j_10);
+  goto __BB4;
+
+  __BB(4):
+  _12 = __PHI (__BB3: _23, __BB2: 0u);
+  return _12;
+}
diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc
index f166c3132cb..918cf50b589 100644
--- a/gcc/tree-ssa-phiopt.cc
+++ b/gcc/tree-ssa-phiopt.cc
@@ -1925,6 +1925,10 @@ minmax_replacement (basic_block cond_bb, basic_block 
middle_bb, basic_block alt_
  || gimple_code (assign) != GIMPLE_ASSIGN)
return false;
 
+  /* There cannot be any phi nodes in the middle bb. */
+  if (!gimple_seq_empty_p (phi_nodes (middle_bb)))
+   return false;
+
   lhs = gimple_assign_lhs (assign);
   ass_code = gimple_assign_rhs_code (assign);
   if (ass_code != MAX_EXPR && ass_code != MIN_EXPR)
@@ -1938,6 +1942,10 @@ minmax_replacement (basic_block cond_bb, basic_block 
middle_bb, basic_block alt_
  || gimple_code (assign) != GIMPLE_ASSIGN)
return false;
 
+  /* There cannot be any phi nodes in the alt middle bb. */
+  if (!gimple_seq_empty_p (phi_nodes (alt_middle_bb)))
+   return false;
+
   alt_lhs = gimple_assign_lhs 

RENTALS...June 30th, 2024/July 28th, 2024

2024-05-18 Thread Mr. and Mrs. Martinez


Hello Mr./Mrs,
please confirm if the dates listed below are available.
Dates listed below.

Arrival date: June 30th, 2024
Departure date: July 28th, 2024
Number of guests: 2 adults

Send me the price for the booking period by e-mail.
Warm regards,
Mr. and Mrs. Martinez


RENTALS...June 30th, 2024/July 28th, 2024

2024-05-18 Thread Mr. and Mrs. Martinez


Hello Mr./Mrs,
please confirm if the dates listed below are available.
Dates listed below.

Arrival date: June 30th, 2024
Departure date: July 28th, 2024
Number of guests: 2 adults

Send me the price for the booking period by e-mail.
Warm regards,
Mr. and Mrs. Martinez


gcc-14-20240518 is now available

2024-05-18 Thread GCC Administrator via Gcc
Snapshot gcc-14-20240518 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/14-20240518/
and on various mirrors, see https://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 14 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch 
releases/gcc-14 revision 3b88dade7ff8a07fd0843ac1281e095cfd94453e

You'll find:

 gcc-14-20240518.tar.xz   Complete GCC

  SHA256=b277511662c4808a3f373e99c53a6fee30407bd07dc2b8c9561418c1cc865579
  SHA1=a2cad16e9422b60fdf14e60f415a47b013f993d5

Diffs from 14-20240511 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-14
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


[to-be-committed][PR target/115142] Do not create invalidate shift-add insn

2024-05-18 Thread Jeff Law
This fixes a minor bug that showed up in the CI system, presumably with 
fuzz testing.


Under the right circumstances, we could end trying to emit a shift-add 
style sequence where the to-be-shifted operand was not a register.  This 
naturally leads to an unrecognized insn.


The circumstances which triggered this weren't something that should 
appear in the wild (-ftree-ter, without optimization enabled).  So I 
wasn't planning to backport.  Obviously if it shows up in another 
context we can revisit that decision.


PR target/115142
gcc/

* config/riscv/riscv.cc (mem_shadd_or_shadd_rtx_p): Make sure
shifted argument is a register.

gcc/testsuite

* gcc.target/riscv/pr115142.c: New test.

I've run this through my rv32gcv and rv64gc tester.  Waiting on the CI 
system before committing.


jeffdiff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 7a34b4be873..d0c22058b8c 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -2465,6 +2465,7 @@ mem_shadd_or_shadd_rtx_p (rtx x)
 {
   return ((GET_CODE (x) == ASHIFT
   || GET_CODE (x) == MULT)
+ && register_operand (XEXP (x, 0), GET_MODE (x))
  && CONST_INT_P (XEXP (x, 1))
  && ((GET_CODE (x) == ASHIFT && IN_RANGE (INTVAL (XEXP (x, 1)), 1, 3))
  || (GET_CODE (x) == MULT
diff --git a/gcc/testsuite/gcc.target/riscv/pr115142.c 
b/gcc/testsuite/gcc.target/riscv/pr115142.c
new file mode 100644
index 000..40ba49dfa20
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/pr115142.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -ftree-ter" } */
+
+long a;
+char b;
+void e() {
+  char f[8][1];
+  b = f[a][a];
+}
+


Results for 15.0.0 20240516 (experimental) [master r15-646-g3c9c52a1c0] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-18 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:3c9c52a1c0fa7af22f769a2116b28a0b7ea18129
gcc-descr r15-646-g3c9c52a1c0fa7a

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May 18 21:10:34 UTC 2024 (revision r15-646-g3c9c52a1c0)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: c-c++-common/torture/strub-run3.c   -O0  execution test

=== g++ Summary for unix/-m32 ===

# of expected passes251796
# of unexpected failures1
# of expected failures  2615
# of unsupported tests  11567

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes260810
# of expected failures  2620
# of unsupported tests  11740

=== g++ Summary ===

# of expected passes512606
# of unexpected failures1
# of expected failures  5235
# of unsupported tests  23307
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240516 
(experimental) [master r15-646-g3c9c52a1c0] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto 

Results for 15.0.0 20240516 (experimental) [master r15-645-g988838da722] (GCC) testsuite on s390x-ibm-linux-gnu default

2024-05-18 Thread stefansf--- via Gcc-testresults
LAST_UPDATED: Sat May 18 17:04:49 UTC 2024 (revision r15-645-g988838da722)

=== acats tests ===
FAIL:   cb1010a
FAIL:   cxa4001

=== acats Summary ===
# of expected passes2326
# of unexpected failures2
Native configuration is s390x-ibm-linux-gnu default

=== gcc tests ===


Running target unix/-m31
FAIL: c-c++-common/asan/pointer-compare-1.c   -O0  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O1  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -Os  output pattern test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O0  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O1  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O3 -g  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -Os  execution test
FAIL: c-c++-common/asan/pr64820.c   -O0  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O1  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -Os  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O0  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O1  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -Os  output pattern test
FAIL: gcc.dg/auto-init-uninit-17.c unconditional (test for warnings, line 14)
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "= ABS_EXPR" 1
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "__builtin_copysign" 
1
FAIL: gcc.dg/gcc-have-sync-compare-and-swap.c (test for excess errors)
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg"
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized ".COPYSIGN" 1
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized "ABS_EXPR" 1
FAIL: gcc.dg/pr90263.c scan-assembler memcpy
FAIL: gcc.dg/signbit-2.c scan-tree-dump optimized "s+>s+{ 0(, 0)+ }"
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/uninit-17.c unconditional (test for warnings, line 14)
FAIL: c-c++-common/goacc/firstprivate-mappings-1.c scan-tree-dump omplower 
"(?n)#pragma omp target oacc_parallel map(from:array_so [len: 
4]) firstprivate(array_li.[0-9]+) 
map(tofrom:(*array.[0-9]+) [len: D.[0-9]+]) 
map(firstprivate:array [pointer assign, bias: 0]) ["
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto 

[Bug tree-optimization/115152] [13/14/15 Regression] wrong code at -O3 with "-fno-tree-fre -fno-tree-dominator-opts -fno-tree-loop-im" on x86_64-linux-gnu

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115152

--- Comment #3 from Andrew Pinski  ---
That is it looks like a bad interaction between `Vector(1) char` stores and
reads from char. BUT I don't understand how it gets that badly wrong.

[Bug tree-optimization/115152] [13/14/15 Regression] wrong code at -O3 with "-fno-tree-fre -fno-tree-dominator-opts -fno-tree-loop-im" on x86_64-linux-gnu

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115152

--- Comment #2 from Andrew Pinski  ---
The bug is in strlen1:
```
maybe_invalidate called for MEM[(char *)] = vect_pretmp_76.13_77;
maybe_invalidate returns 1
maybe_invalidate called for MEM[(char *)] = vect_pretmp_89.18_79;
maybe_invalidate returns 1
Optimizing: pretmp_34 = e[0];
into: pretmp_34 = 0;
maybe_invalidate called for e[0] = pretmp_34;
  statement may clobber object  0 bytes in size
maybe_invalidate returns 1
maybe_invalidate called for c = _5;
maybe_invalidate returns 0
maybe_invalidate called for a = _54;
maybe_invalidate returns 0
maybe_invalidate called for b = 2;
maybe_invalidate returns 0
maybe_invalidate called for __builtin_abort ();
maybe_invalidate returns 0
pointer_query counters:
  index cache size:   0
  index entries:  0
  access cache size:  0
  access entries: 0
  hits:   0
  misses: 0
  failures:   0
  max_depth:  0
```

[Bug tree-optimization/115152] [13/14/15 Regression] wrong code at -O3 with "-fno-tree-fre -fno-tree-dominator-opts -fno-tree-loop-im" on x86_64-linux-gnu

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115152

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-05-18
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug tree-optimization/115152] [13/14/15 Regression] wrong code at -O3 with "-fno-tree-fre -fno-tree-dominator-opts -fno-tree-loop-im" on x86_64-linux-gnu

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115152

Andrew Pinski  changed:

   What|Removed |Added

Summary|wrong code at -O3 with  |[13/14/15 Regression] wrong
   |"-fno-tree-fre  |code at -O3 with
   |-fno-tree-dominator-opts|"-fno-tree-fre
   |-fno-tree-loop-im" on   |-fno-tree-dominator-opts
   |x86_64-linux-gnu|-fno-tree-loop-im" on
   ||x86_64-linux-gnu
   Target Milestone|--- |13.3

[Bug driver/111527] COLLECT_GCC_OPTIONS option hits single-variable limits too early

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111527

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-18
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #11 from Andrew Pinski  ---
Note using "/tmp/rsp.txt" is not acceptable at all since there might be a few
linking happening on the machine. You should use make_at_file (which will make
either a tmp file which will be deleted at the end compiling or an .args.N file
which can be looked at if used with -save-temps) instead from gcc.cc and then
pass the filename to collect2 as "@filename" and then inside collect2 expand as
needed.

[Bug target/115142] [14/15 Regression] Unrecognizable insn in extract_insn, at recog.cc:2812 with -ftree-ter

2024-05-18 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115142

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug target/115142] [14/15 Regression] Unrecognizable insn in extract_insn, at recog.cc:2812 with -ftree-ter

2024-05-18 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115142

Jeffrey A. Law  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-18
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

☠ Buildbot (Sourceware): gcc-autoregen - failed 'git diff ...' (failure) (master)

2024-05-18 Thread builder--- via Gcc-testresults
A new failure has been detected on builder gcc-autoregen while building gcc.

Full details are available at:
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150

Build state: failed 'git diff ...' (failure)
Revision: a6114c2a691112f9cf5b072c21685d2e43c76d81
Worker: bb3
Build Reason: (unknown)
Blamelist: Palmer Dabbelt 

Steps:

- 0: worker_preparation ( success )

- 1: git checkout ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/1/logs/stdio

- 2: autoregen.py ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/2/logs/stdio

- 3: git diff ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/3/logs/stdio

- 4: mkdir objdir ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/4/logs/stdio

- 5: configure ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/5/logs/stdio

- 6: make html ( warnings )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/6/logs/stdio
- warnings (68): 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/6/logs/warnings__68_

- 7: make regenerate-opt-urls ( success )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/7/logs/stdio

- 8: git diff_1 ( failure )
Logs:
- stdio: 
https://builder.sourceware.org/buildbot/#/builders/269/builds/5150/steps/8/logs/stdio



[gcc r15-647] RISC-V: Implement -m{,no}fence-tso

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:a6114c2a691112f9cf5b072c21685d2e43c76d81

commit r15-647-ga6114c2a691112f9cf5b072c21685d2e43c76d81
Author: Palmer Dabbelt 
Date:   Sat May 18 15:15:09 2024 -0600

RISC-V: Implement -m{,no}fence-tso

Some processors from T-Head don't implement the `fence.tso` instruction
natively and instead trap to firmware.  This breaks some users who
haven't yet updated the firmware and one could imagine it breaking users
who are trying to build firmware if they're using the C memory model.

So just add an option to disable emitting it, in a similar fashion to
how we allow users to forbid other instructions.

Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070959
---
I've just smoke tested this one, but

void func(void) { __atomic_thread_fence(__ATOMIC_ACQ_REL); }

generates `fence.tso` without the argument and `fence rw,rw` with
`-mno-fence-tso`, so it seems to be at least mostly there.  I figured
I'd just send it up for comments before putting together the DG bits:
it's kind of a pain to carry around these workarounds for unimplemented
instructions, but it's in HW so there's not much we can do about that.

gcc/ChangeLog:

* config/riscv/riscv.opt: Add -mno-fence-tso.
* config/riscv/sync-rvwmo.md (mem_thread_fence_rvwmo): Respect
-mno-fence-tso.
* doc/invoke.texi (RISC-V): Document -mno-fence-tso.

Diff:
---
 gcc/config/riscv/riscv.opt | 4 
 gcc/config/riscv/sync-rvwmo.md | 2 +-
 gcc/doc/invoke.texi| 8 
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
index d209ac896fde..87f583320168 100644
--- a/gcc/config/riscv/riscv.opt
+++ b/gcc/config/riscv/riscv.opt
@@ -624,3 +624,7 @@ Enum(tls_type) String(desc) Value(TLS_DESCRIPTORS)
 mtls-dialect=
 Target RejectNegative Joined Enum(tls_type) Var(riscv_tls_dialect) 
Init(TLS_TRADITIONAL) Save
 Specify TLS dialect.
+
+mfence-tso
+Target Var(TARGET_FENCE_TSO) Init(1)
+Specifies whether the fence.tso instruction should be used.
diff --git a/gcc/config/riscv/sync-rvwmo.md b/gcc/config/riscv/sync-rvwmo.md
index d4fd26069f74..e639a1e23924 100644
--- a/gcc/config/riscv/sync-rvwmo.md
+++ b/gcc/config/riscv/sync-rvwmo.md
@@ -33,7 +33,7 @@
 if (model == MEMMODEL_SEQ_CST)
return "fence\trw,rw";
 else if (model == MEMMODEL_ACQ_REL)
-   return "fence.tso";
+   return TARGET_FENCE_TSO ? "fence.tso" : "fence\trw,rw";
 else if (model == MEMMODEL_ACQUIRE)
return "fence\tr,rw";
 else if (model == MEMMODEL_RELEASE)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b9408ecc9188..70e8004a71b2 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1244,6 +1244,7 @@ See RS/6000 and PowerPC Options.
 -mplt  -mno-plt
 -mabi=@var{ABI-string}
 -mfdiv  -mno-fdiv
+-mfence-tso  -mno-fence-tso
 -mdiv  -mno-div
 -misa-spec=@var{ISA-spec-string}
 -march=@var{ISA-string}
@@ -30436,6 +30437,13 @@ Do or don't use hardware floating-point divide and 
square root instructions.
 This requires the F or D extensions for floating-point registers.  The default
 is to use them if the specified architecture has these instructions.
 
+@opindex mfence-tso
+@item -mfence-tso
+@itemx -mno-fence-tso
+Do or don't use the @samp{fence.tso} instruction, which is unimplemented on
+some processors (including those from T-Head).  If the @samp{fence.tso}
+instruction is not availiable then a stronger fence will be used instead.
+
 @opindex mdiv
 @item -mdiv
 @itemx -mno-div


[gcc r13-8777] [committed] Fix RISC-V missing stack tie

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:162c441c9462d073c53dde87258898795bf28a5c

commit r13-8777-g162c441c9462d073c53dde87258898795bf28a5c
Author: Jeff Law 
Date:   Thu Mar 21 20:41:59 2024 -0600

[committed] Fix RISC-V missing stack tie

As some of you know, Raphael has been working on stack-clash support for the
RISC-V port.  A little while ago Florian reached out to us with an issue 
where
glibc was failing its smoke test due to referencing an unallocated stack 
slot.

Without diving into the code in detail I (incorrectly) concluded it was a
problem with the fallback of using Ada's stack-check paths due to not having
stack-clash support.

Once enough stack-clash bits were ready I had Raphael review the code 
generated
for Florian's test and we concluded the the original case from Florian was 
just
wrong irrespective of stack clash/stack check.  While Raphael's stack-clash
work will indirectly fix Florian's case, it really should also work without
stack-clash.

In particular this code was called out by valgrind:

> 0003cb5e :
> __GI___realpath():
>3cb5e:   81010113addisp,sp,-2032
>3cb62:   7d313423sd  s3,1992(sp)
>3cb66:   79fdlui s3,0xf
>3cb68:   7e813023sd  s0,2016(sp)
>3cb6c:   7c913c23sd  s1,2008(sp)
>3cb70:   7f010413addis0,sp,2032
>3cb74:   35098793addia5,s3,848 # 
f350 <__libc_initial+0xffe8946a>
>3cb78:   74fdlui s1,0xf
>3cb7a:   008789b3add s3,a5,s0
>3cb7e:   f9048793addia5,s1,-112 # 
ef90 <__libc_initial+0xffe890aa>
>3cb82:   008784b3add s1,a5,s0
>3cb86:   77fdlui a5,0xf
>3cb88:   7d413023sd  s4,1984(sp)
>3cb8c:   7b513c23sd  s5,1976(sp)
>3cb90:   7e113423sd  ra,2024(sp)
>3cb94:   7d213823sd  s2,2000(sp)
>3cb98:   7b613823sd  s6,1968(sp)
>3cb9c:   7b713423sd  s7,1960(sp)
>3cba0:   7b813023sd  s8,1952(sp)
>3cba4:   79913c23sd  s9,1944(sp)
>3cba8:   79a13823sd  s10,1936(sp)
>3cbac:   79b13423sd  s11,1928(sp)
>3cbb0:   34878793addia5,a5,840 # 
f348 <__libc_initial+0xffe89462>
>3cbb4:   4713li  a4,1024
>3cbb8:   00132a17auipc   s4,0x132
>3cbbc:   ae0a3a03ld  s4,-1312(s4) # 16e698 
<__stack_chk_guard>
>3cbc0:   01098893addia7,s3,16
>3cbc4:   42098693addia3,s3,1056
>3cbc8:   b8040a93addis5,s0,-1152
>3cbcc:   97a2add a5,a5,s0
>3cbce:   000a3603ld  a2,0(s4)
>3cbd2:   f8c43423sd  a2,-120(s0)
>3cbd6:   4601li  a2,0
>3cbd8:   3d14b023sd  a7,960(s1)
>3cbdc:   3ce4b423sd  a4,968(s1)
>3cbe0:   7cd4b823sd  a3,2000(s1)
>3cbe4:   7ce4bc23sd  a4,2008(s1)
>3cbe8:   b7543823sd  s5,-1168(s0)
>3cbec:   b6e43c23sd  a4,-1160(s0)
>3cbf0:   e38csd  a1,0(a5)
>3cbf2:   b0010113addisp,sp,-1280
In particular note the store at 0x3cbd8.  That's hitting (s1 + 960). If you
chase the values around, you'll find it's a bit more than 1k into 
unallocated
stack space.  It's also worth noting the final stack adjustment at 0x3cbf2.

While I haven't reproduced Florian's code exactly, I was able to get 
reasonably
close and verify my suspicion that everything was fine before sched2 and
incorrect after sched2.  It was also obvious at that point what had gone 
wrong
-- we were missing a stack tie after the final stack pointer adjustment.

This patch adds the missing stack tie.

While not technically a regression, I shudder at the thought of chasing one 
of
these issues down again in the wild.  Been there, done that.

Regression tested on rv64gc.  Verified the scheduler no longer mucked up
realpath by hand.  Pushing to the trunk.

gcc/
* config/riscv/riscv.cc (riscv_expand_prologue): Add missing stack
 

[gcc r15-646] [to-be-committed, RISC-V] Improve some shift-add sequences

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:3c9c52a1c0fa7af22f769a2116b28a0b7ea18129

commit r15-646-g3c9c52a1c0fa7af22f769a2116b28a0b7ea18129
Author: Jeff Law 
Date:   Sat May 18 15:08:07 2024 -0600

[to-be-committed,RISC-V] Improve some shift-add sequences

So this is a minor fix/improvement for shift-add sequences.  This was
supposed to help xz in a minor way IIRC.

Combine may present us with (x + C2') << C1 which was canonicalized from
(x << C1) + C2.

Depending on the precise values of C2 and C2' one form may be better
than the other.  We can (somewhat awkwardly) use riscv_const_insns to
test for which sequence would be preferred.

Tested on Ventana's CI system as well as my own.  Waiting on CI results
from Rivos's tester before moving forward.

Jeff
gcc/
* config/riscv/riscv.md: Add new patterns to allow selection
between (x << C1) + C2 vs (x + C2') << C1 depending on the
cost C2 vs C2'.

gcc/testsuite

* gcc.target/riscv/shift-add-1.c: New test.

Diff:
---
 gcc/config/riscv/riscv.md| 56 
 gcc/testsuite/gcc.target/riscv/shift-add-1.c | 21 +++
 2 files changed, 77 insertions(+)

diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index ff4557c1325f..78c16adee980 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -4162,6 +4162,62 @@
   }
 )
 
+;; These are forms of (x << C1) + C2, potentially canonicalized from
+;; ((x + C2') << C1.  Depending on the cost to load C2 vs C2' we may
+;; want to go ahead and recognize this form as C2 may be cheaper to
+;; synthesize than C2'.
+;;
+;; It might be better to refactor riscv_const_insns a bit so that we
+;; can have an API that passes integer values around rather than
+;; constructing a lot of garbage RTL.
+;;
+;; The mvconst_internal pattern in effect requires this pattern to
+;; also be a define_insn_and_split due to insn count costing when
+;; splitting in combine.
+(define_insn_and_split ""
+  [(set (match_operand:DI 0 "register_operand" "=r")
+   (plus:DI (ashift:DI (match_operand:DI 1 "register_operand" "r")
+   (match_operand 2 "const_int_operand" "n"))
+(match_operand 3 "const_int_operand" "n")))
+   (clobber (match_scratch:DI 4 "="))]
+  "(TARGET_64BIT
+&& riscv_const_insns (operands[3])
+&& ((riscv_const_insns (operands[3])
+< riscv_const_insns (GEN_INT (INTVAL (operands[3]) >> INTVAL 
(operands[2]
+   || riscv_const_insns (GEN_INT (INTVAL (operands[3]) >> INTVAL 
(operands[2]))) == 0))"
+  "#"
+  "&& reload_completed"
+  [(set (match_dup 0) (ashift:DI (match_dup 1) (match_dup 2)))
+   (set (match_dup 4) (match_dup 3))
+   (set (match_dup 0) (plus:DI (match_dup 0) (match_dup 4)))]
+  ""
+  [(set_attr "type" "arith")])
+
+(define_insn_and_split ""
+  [(set (match_operand:DI 0 "register_operand" "=r")
+   (sign_extend:DI (plus:SI (ashift:SI
+  (match_operand:SI 1 "register_operand" "r")
+  (match_operand 2 "const_int_operand" "n"))
+(match_operand 3 "const_int_operand" "n"
+   (clobber (match_scratch:DI 4 "="))]
+  "(TARGET_64BIT
+&& riscv_const_insns (operands[3])
+&& ((riscv_const_insns (operands[3])
+< riscv_const_insns (GEN_INT (INTVAL (operands[3]) >> INTVAL 
(operands[2]
+   || riscv_const_insns (GEN_INT (INTVAL (operands[3]) >> INTVAL 
(operands[2]))) == 0))"
+  "#"
+  "&& reload_completed"
+  [(set (match_dup 0) (ashift:DI (match_dup 1) (match_dup 2)))
+   (set (match_dup 4) (match_dup 3))
+   (set (match_dup 0) (sign_extend:DI (plus:SI (match_dup 5) (match_dup 6]
+  "{
+ operands[1] = gen_lowpart (DImode, operands[1]);
+ operands[5] = gen_lowpart (SImode, operands[0]);
+ operands[6] = gen_lowpart (SImode, operands[4]);
+   }"
+  [(set_attr "type" "arith")])
+
+
 (include "bitmanip.md")
 (include "crypto.md")
 (include "sync.md")
diff --git a/gcc/testsuite/gcc.target/riscv/shift-add-1.c 
b/gcc/testsuite/gcc.target/riscv/shift-add-1.c
new file mode 100644
index ..d98875c32716
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/shift-add-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gc_zba_zbb_zbs -mabi=lp64" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
+
+int composeFromSurrogate(const unsigned short high) {
+
+return  ((high - 0xD800) << 10) ;
+}
+
+
+long composeFromSurrogate_2(const unsigned long high) {
+
+return  ((high - 0xD800) << 10) ;
+}
+
+
+/* { dg-final { scan-assembler-times "\tli\t" 2 } } */
+/* { dg-final { scan-assembler-times "\tslli\t" 2 } } */
+/* { dg-final { scan-assembler-times "\taddw\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tadd\t" 1 } } */
+


[Bug analyzer/114896] analyzer: false-positive with VLA (analyzer-out-of-bounds, CWE-121)

2024-05-18 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114896

uecker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||uecker at gcc dot gnu.org

--- Comment #3 from uecker at gcc dot gnu.org ---

Minimal example:

void foo(void*);

int main(void)
{
unsigned int n;
foo();
int e[n] = { };
return e[n - 1];
}

https://godbolt.org/z/hYPqahYY8

[Bug c++/115121] ++const_dependent_ptr is accepted in uninstantiated template

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115121

Andrew Pinski  changed:

   What|Removed |Added

Summary|++this is accepted in   |++const_dependent_ptr is
   |uninstantiated template |accepted in uninstantiated
   ||template

--- Comment #1 from Andrew Pinski  ---
Slightly different testcase (without using this) which shows the issue:
```
template
int f() {
T t = 0;
T *const t1 = 
int t2 = 0;
int *const t3 = 
++t1;
//++t3;
return 0;
}

//const int t = f();
```
This should be rejected as pointer can't have an overload for operator++ even
if the pointer type has a dependent type.
GCC does reject `++t3;` but not `++t1;` at definition time.

[Bug libstdc++/115122] Incorrect detection of C99 support when cross back builds

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115122

Andrew Pinski  changed:

   What|Removed |Added

  Build||x86_64-linux-gnu
Summary|Incorrect detection of C99  |Incorrect detection of C99
   |support when|support when cross back
   |cross-compiling |builds
   Host||x86_64-w64-mingw32

--- Comment #1 from Andrew Pinski  ---
When I do cross back builds, I normally don't rebuild the target libraries and
just use the already built target libraries from the cross builds. Since you
are now building the target libraries twice and you really don't need to
though.

[Bug middle-end/115131] [15 regression] ICE when building (external) rtl88x2bu kernel module (in verify_range, at value-range.cc:677)

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115131

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Target Milestone|--- |15.0

[Bug sanitizer/115127] [12/13/14/15 Regression] passing zero to __builtin_ctz() check missing

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115127

--- Comment #2 from Andrew Pinski  ---
Also I tested even the simplified testcase:
```
volatile int t = 1;

int main (int argc, char* argv[])
{
volatile int print_hash_value = 0;
if (t == 2) print_hash_value = 1;
__builtin_ctz(print_hash_value);
return 0;
}
```
And the trunk reports:
/app/example.cpp:261:5: runtime error: passing zero to ctz(), which is not a
valid argument

Just fine.

[Bug tree-optimization/115152] New: wrong code at -O3 with "-fno-tree-fre -fno-tree-dominator-opts -fno-tree-loop-im" on x86_64-linux-gnu

2024-05-18 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115152

Bug ID: 115152
   Summary: wrong code at -O3 with "-fno-tree-fre
-fno-tree-dominator-opts -fno-tree-loop-im" on
x86_64-linux-gnu
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

This appears to be a regression from 12.*, and affects 13.* and later. 

Compiler Explorer: https://godbolt.org/z/cvM1TYd7h


[598] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240516 (experimental) (GCC) 
[599] % 
[599] % gcctk -O3 small.c; ./a.out
[600] % 
[600] % gcctk -O3 -fno-tree-fre -fno-tree-dominator-opts -fno-tree-loop-im
small.c
[601] % ./a.out
Aborted
[602] % 
[602] % cat small.c
int a, b, c, d;
char e[1] = {1};
int main() {
  for (a = 0; a < 3; a++)
for (b = 0; b < 2; b++)
  c = e[0] = e[0] ^ d;
  if (!c)
__builtin_abort();
  return 0;
}

[Bug c/114831] typeof doesn't evaluate expression when it has variably modified type in some cases

2024-05-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114831

Martin Uecker  changed:

   What|Removed |Added

 CC||muecker at gwdg dot de

--- Comment #2 from Martin Uecker  ---

PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652089.html

[Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23)

2024-05-18 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109

--- Comment #2 from uecker at gcc dot gnu.org ---

PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652093.html

[C PATCH] Fix for redeclared enumerator initialized with different type [PR115109]

2024-05-18 Thread Martin Uecker



Bootstrapped and regression tested on x86_64



c23: Fix for redeclared enumerator initialized with different type 
[PR115109]

c23 specifies that the type of a redeclared enumerator is the one of the
previous declaration.  Convert initializers with different type accordingly
and add -Woverflow warning.

2024-05-18 Martin Uecker  

PR c/115109

gcc/c/
* c-decl.cc (build_enumerator): When redeclaring an
  enumerator convert value to previous type.

gcc/testsuite/
* gcc.dg/pr115109.c: New test.
* gcc.dg/c23-tag-enum-6.c: New test.

diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index b691b91b3db..08a51c7ad50 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -10209,6 +10209,7 @@ build_enumerator (location_t decl_loc, location_t loc,
  struct c_enum_contents *the_enum, tree name, tree value)
 {
   tree decl;
+  tree old_decl;
 
   /* Validate and default VALUE.  */
 
@@ -10268,6 +10269,25 @@ build_enumerator (location_t decl_loc, location_t loc,
 definition.  */
   value = convert (the_enum->enum_type, value);
 }
+  else if (flag_isoc23
+  && (old_decl = lookup_name_in_scope (name, current_scope))
+  && old_decl != error_mark_node
+  && TREE_TYPE (old_decl)
+  && TREE_TYPE (TREE_TYPE (old_decl))
+  && TREE_CODE (old_decl) == CONST_DECL)
+{
+  tree previous_type = TREE_TYPE (TREE_TYPE (old_decl));
+
+  if (!int_fits_type_p (value, previous_type))
+   {
+ warning_at (loc, OPT_Woverflow,
+ "value of redeclared enumerator outside the range of "
+ "the previous type %qT", previous_type);
+ locate_old_decl (old_decl);
+   }
+
+  value = convert (previous_type, value);
+}
   else
 {
   /* Even though the underlying type of an enum is unspecified, the
diff --git a/gcc/testsuite/gcc.dg/c23-tag-enum-6.c 
b/gcc/testsuite/gcc.dg/c23-tag-enum-6.c
new file mode 100644
index 000..ff9ec89775e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c23-tag-enum-6.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c23" } */
+
+#include 
+
+enum E : int { a = 1, b = 2 };
+enum E : int { b = _Generic(a, enum E: 2), a = 1 };
+
+enum H { x = 1 };
+enum H { x = 2UL + UINT_MAX }; /* { dg-warning "outside the range" } */
+
+enum K : int { z = 1 };
+enum K : int { z = 2UL + UINT_MAX };   /* { dg-error "outside the range" } */
+
diff --git a/gcc/testsuite/gcc.dg/pr115109.c b/gcc/testsuite/gcc.dg/pr115109.c
new file mode 100644
index 000..0c327ce1697
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr115109.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c23" } */
+
+enum E { a = 1L, b = 2 };
+enum E { a = 1L, b = _Generic(a, enum E: 2) };
+



[Bug sanitizer/115127] [12/13/14/15 Regression] passing zero to __builtin_ctz() check missing

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115127

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-18
 Ever confirmed|0   |1
 Status|UNCONFIRMED |WAITING

--- Comment #1 from Andrew Pinski  ---
Can you attach the preprocessed source?

[Bug other/115136] [15 regression] experimental/functional/searchers.cc fails after

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115136

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|INVALID |FIXED
   Target Milestone|--- |15.0
   Keywords||testsuite-fail, wrong-code

[Bug tree-optimization/115035] Missed optimization: fold min/max in phi

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115035

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-05-18

--- Comment #1 from Andrew Pinski  ---
Confirmed. GCC does have some code that handles some of this in phiopt but not
in a generic way.

Jump threading can handle:
```
int src1(unsigned a, unsigned b, int c) {
unsigned phi;
if(c) {
dummy();
phi = a < 5 ? a : 5;
} else {
phi = b;
}
if (phi < 6)
  dummy();
}
```

But not:
```
int src(unsigned a, unsigned b, int c) {
unsigned phi;
if(c) {
dummy();
phi = a < 5 ? a : 5;
} else {
phi = b;
}
return (phi < 6);
 dummy();
}
```

[Bug tree-optimization/115035] Missed optimization: fold min/max in phi

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115035

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

Results for 15.0.0 20240516 (experimental) [master revision gcc-15-645-g988838da722] (GCC) testsuite on aarch64-unknown-linux-gnu

2024-05-18 Thread ci_notify--- via Gcc-testresults
# From https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/2023/:
LAST_UPDATED: 2024-05-18T19:03:43+00:00 (master revision 
gcc-15-645-g988838da722) aarch64-unknown-linux-gnu

Native configuration is aarch64-unknown-linux-gnu

=== libatomic tests ===


Running target tcwg-local

=== libatomic Summary ===

# of expected passes54
=== libgomp tests ===


Running target tcwg-local
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)

=== libgomp Summary ===

# of expected passes16210
# of unexpected failures8
# of expected failures  284
# of unsupported tests  649
=== libitm tests ===


Running target tcwg-local

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libstdc++ tests ===


Running target tcwg-local

=== libstdc++ Summary ===

# of expected passes18556
# of expected failures  126
# of unsupported tests  747
=== gcc tests ===


Running target tcwg-local
FAIL: gcc.dg/guality/vla-1.c   -O2  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 24 i == 5
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 24 sizeof (a) == 17 * sizeof 
(short)
FAIL: gcc.dg/guality/vla-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 17 sizeof 
(a) == 6
FAIL: gcc.dg/guality/vla-1.c   -Os  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread2 "Jumps 
threaded: 18"
FAIL: gcc.target/aarch64/aes_xor_combine.c scan-assembler-not eor
FAIL: gcc.target/aarch64/aes_xor_combine.c scan-assembler-not mov
FAIL: gcc.target/aarch64/ashltidisi.c scan-assembler-times asr 3
FAIL: gcc.target/aarch64/asimd-mull-elem.c scan-assembler-times 
s+fmultv[0-9]+.4s, v[0-9]+.4s, v[0-9]+.s[0] 4
FAIL: gcc.target/aarch64/asimd-mull-elem.c scan-assembler-times 
s+multv[0-9]+.4s, v[0-9]+.4s, v[0-9]+.s[0] 4
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align16.c check-function-bodies g1
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align16.c check-function-bodies g16
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align16.c check-function-bodies 
g16p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align16.c check-function-bodies g1p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align16.c check-function-bodies g8
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align16.c check-function-bodies g8p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g1
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g16
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g16p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g1p
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g8
FAIL: gcc.target/aarch64/bitfield-bitint-abi-align8.c check-function-bodies g8p
FAIL: gcc.target/aarch64/ccmp_3.c scan-assembler-not \\tcbnz\\t
XPASS: gcc.target/aarch64/pr100056.c 

Results for 15.0.0 20240517 (experimental) [master 9bd0b709ddb70589436c326142b1566f49f5e979] (GCC) testsuite on sparc-sun-solaris2.11

2024-05-18 Thread Rainer Orth
LAST_UPDATED: Fri May 17 08:59:50 UTC 2024 (revision 
9bd0b709ddb70589436c326142b1566f49f5e979)

=== acats tests ===
FAIL:   cxa4001

=== acats Summary ===
# of expected passes2327
# of unexpected failures1
Native configuration is sparc-sun-solaris2.11

=== g++ tests ===


Running target unix
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  gcov: 12 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 14: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 21: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 37: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 43: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 48: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 53: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 58: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 63: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 68: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 73: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++14  line 78: is 2:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  gcov: 12 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 14: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 21: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 37: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 43: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 48: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 53: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 58: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 63: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 68: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 73: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++17  line 78: is 3:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  gcov: 12 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 14: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 21: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 37: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 43: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 48: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 53: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 58: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 63: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 68: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 73: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++20  line 78: is 4:should be 1
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++98  gcov: 1 failures in line 
counts, 0 in branch percentages, 0 in condition/decision, 0 in return 
percentages, 0 in intermediate format
FAIL: g++.dg/gcov/pr16855-priority.C  -std=gnu++98  line 23: is #:should be 
1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  gcov: 6 failures in line counts, 0 
in branch percentages, 0 in condition/decision, 0 in return percentages, 0 in 
intermediate format
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 15: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 22: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 24: is #:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 38: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 44: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++14  line 49: is 2:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  gcov: 6 failures in line counts, 0 
in branch percentages, 0 in condition/decision, 0 in return percentages, 0 in 
intermediate format
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  line 15: is 3:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  line 22: is 3:should be 1
FAIL: g++.dg/gcov/pr16855.C  -std=gnu++17  line 24: is #:should 

Re: [PATCH] Optab: add isfinite_optab for __builtin_isfinite

2024-05-18 Thread Andrew Pinski
On Thu, Apr 11, 2024 at 8:07 PM HAO CHEN GUI  wrote:
>
> Hi,
>   This patch adds an optab for __builtin_isfinite. The finite check can be
> implemented on rs6000 by a single instruction. It needs an optab to be
> expanded to the certain sequence of instructions.
>
>   The subsequent patches will implement the expand on rs6000.
>
>   Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no
> regressions. Is this OK for next stage-1?


This is missing adding documentation for the new optab.
It should be documented in md.texi under `Standard Pattern Names For
Generation` section.

Thanks,
Andrew


>
> Thanks
> Gui Haochen
>
> ChangeLog
> optab: Add isfinite_optab for isfinite builtin
>
> gcc/
> * builtins.cc (interclass_mathfn_icode): Set optab to isfinite_optab
> for isfinite builtin.
> * optabs.def (isfinite_optab): New.
>
> patch.diff
> diff --git a/gcc/builtins.cc b/gcc/builtins.cc
> index d2786f207b8..5262aa01660 100644
> --- a/gcc/builtins.cc
> +++ b/gcc/builtins.cc
> @@ -2459,8 +2459,9 @@ interclass_mathfn_icode (tree arg, tree fndecl)
>errno_set = true; builtin_optab = ilogb_optab; break;
>  CASE_FLT_FN (BUILT_IN_ISINF):
>builtin_optab = isinf_optab; break;
> -case BUILT_IN_ISNORMAL:
>  case BUILT_IN_ISFINITE:
> +  builtin_optab = isfinite_optab; break;
> +case BUILT_IN_ISNORMAL:
>  CASE_FLT_FN (BUILT_IN_FINITE):
>  case BUILT_IN_FINITED32:
>  case BUILT_IN_FINITED64:
> diff --git a/gcc/optabs.def b/gcc/optabs.def
> index ad14f9328b9..dcd77315c2a 100644
> --- a/gcc/optabs.def
> +++ b/gcc/optabs.def
> @@ -352,6 +352,7 @@ OPTAB_D (fmod_optab, "fmod$a3")
>  OPTAB_D (hypot_optab, "hypot$a3")
>  OPTAB_D (ilogb_optab, "ilogb$a2")
>  OPTAB_D (isinf_optab, "isinf$a2")
> +OPTAB_D (isfinite_optab, "isfinite$a2")
>  OPTAB_D (issignaling_optab, "issignaling$a2")
>  OPTAB_D (ldexp_optab, "ldexp$a3")
>  OPTAB_D (log10_optab, "log10$a2")


Re: [PATCH] Optab: add isnormal_optab for __builtin_isnormal

2024-05-18 Thread Andrew Pinski
On Fri, Apr 12, 2024 at 1:10 AM HAO CHEN GUI  wrote:
>
> Hi,
>   This patch adds an optab for __builtin_isnormal. The normal check can be
> implemented on rs6000 by a single instruction. It needs an optab to be
> expanded to the certain sequence of instructions.
>
>   The subsequent patches will implement the expand on rs6000.
>
>   Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no
> regressions. Is this OK for next stage-1?

This is missing adding documentation for the new optab.
It should be documented in md.texi under `Standard Pattern Names For
Generation` section.

Thanks,
Andrew

>
> Thanks
> Gui Haochen
> ChangeLog
> optab: Add isnormal_optab for isnormal builtin
>
> gcc/
> * builtins.cc (interclass_mathfn_icode): Set optab to isnormal_optab
> for isnormal builtin.
> * optabs.def (isnormal_optab): New.
>
> patch.diff
> diff --git a/gcc/builtins.cc b/gcc/builtins.cc
> index 3174f52ebe8..defb39de95f 100644
> --- a/gcc/builtins.cc
> +++ b/gcc/builtins.cc
> @@ -2462,6 +2462,7 @@ interclass_mathfn_icode (tree arg, tree fndecl)
>  case BUILT_IN_ISFINITE:
>builtin_optab = isfinite_optab; break;
>  case BUILT_IN_ISNORMAL:
> +  builtin_optab = isnormal_optab; break;
>  CASE_FLT_FN (BUILT_IN_FINITE):
>  case BUILT_IN_FINITED32:
>  case BUILT_IN_FINITED64:
> diff --git a/gcc/optabs.def b/gcc/optabs.def
> index dcd77315c2a..3c401fc0b4c 100644
> --- a/gcc/optabs.def
> +++ b/gcc/optabs.def
> @@ -353,6 +353,7 @@ OPTAB_D (hypot_optab, "hypot$a3")
>  OPTAB_D (ilogb_optab, "ilogb$a2")
>  OPTAB_D (isinf_optab, "isinf$a2")
>  OPTAB_D (isfinite_optab, "isfinite$a2")
> +OPTAB_D (isnormal_optab, "isnormal$a2")
>  OPTAB_D (issignaling_optab, "issignaling$a2")
>  OPTAB_D (ldexp_optab, "ldexp$a3")
>  OPTAB_D (log10_optab, "log10$a2")


[Bug other/115140] [15 regression] libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c excess errors after r15-579-ga9251ab3c91c8c

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115140

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |15.0

[Bug tree-optimization/115144] [15 Regression] 2% performance regression for some codes with r15-518-g99b1daae18c095

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115144

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 CC||pinskia at gcc dot gnu.org
   Target Milestone|--- |15.0

Results for 15.0.0 20240516 (experimental) [master revision gcc-15-645-g988838da722] (GCC) testsuite on armv8l-unknown-linux-gnueabihf

2024-05-18 Thread ci_notify--- via Gcc-testresults
# From 
https://ci.linaro.org/job/tcwg_gnu_native_check_gcc--master-arm-build/1177/:
LAST_UPDATED: 2024-05-18T18:39:31+00:00 (master revision 
gcc-15-645-g988838da722) armv8l-unknown-linux-gnueabihf

Native configuration is armv8l-unknown-linux-gnueabihf

=== libatomic tests ===


Running target tcwg-local

=== libatomic Summary ===

# of expected passes44
# of unsupported tests  5
=== libffi tests ===


Running target tcwg-local

=== libffi Summary ===

# of expected passes1574
=== libgo tests ===


Running target unix
FAIL: go/types
FAIL: runtime
FAIL: runtime/debug
FAIL: runtime/pprof
FAIL: sync/atomic

=== libgo Summary ===

# of expected passes191
# of unexpected failures5
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/builds/armv8l-unknown-linux-gnueabihf/armv8l-unknown-linux-gnueabihf/gcc-gcc.git~master-stage2/./gcc/gccgo
 version 15.0.0 20240516 (experimental) [master revision 
gcc-15-645-g988838da722] (GCC)

=== libgomp tests ===


Running target tcwg-local
XPASS: libgomp.c/alloc-pinned-1.c execution test
XPASS: libgomp.c/alloc-pinned-2.c execution test
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
190 (test for warnings, line 185)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
221 (test for warnings, line 214)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2   at line 
252 (test for warnings, line 245)
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c 
-DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O2  (test for 
excess errors)

=== libgomp Summary ===

# of expected passes16097
# of unexpected failures8
# of unexpected successes   2
# of expected failures  284
# of unsupported tests  705
=== libitm tests ===


Running target tcwg-local

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libphobos tests ===


Running target tcwg-local
FAIL: libphobos.druntime/object.d (test for excess errors)
FAIL: libphobos.druntime_shared/object.d (test for excess errors)
FAIL: libphobos.exceptions/rt_trap_exceptions.d output pattern test
FAIL: libphobos.phobos/std/complex.d execution test
FAIL: libphobos.phobos/std/concurrency.d (test for excess errors)
FAIL: libphobos.phobos/std/experimental/allocator/building_blocks/free_list.d 
(test for excess errors)
FAIL: libphobos.phobos/std/experimental/allocator/building_blocks/free_tree.d 
(test for excess errors)
FAIL: 
libphobos.phobos/std/experimental/allocator/building_blocks/kernighan_ritchie.d 
execution test
FAIL: libphobos.phobos/std/experimental/allocator/mmap_allocator.d execution 
test
FAIL: libphobos.phobos/std/experimental/allocator/package.d (test for excess 
errors)
FAIL: libphobos.phobos/std/format/internal/floats.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/format/internal/floats.d compilation failed to 
produce executable
FAIL: libphobos.phobos/std/format/internal/write.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/format/internal/write.d compilation failed to 
produce executable
FAIL: libphobos.phobos/std/math/hardware.d execution test
FAIL: libphobos.phobos/std/math/operations.d (test for excess errors)
UNRESOLVED: libphobos.phobos/std/math/operations.d compilation failed to 
produce executable
FAIL: libphobos.phobos/std/parallelism.d execution test
FAIL: libphobos.phobos/std/random.d (test for excess errors)
FAIL: libphobos.phobos/std/range/package.d (test for excess errors)
FAIL: libphobos.phobos/std/typecons.d (test for excess errors)
FAIL: libphobos.phobos_shared/std/complex.d execution test
FAIL: libphobos.phobos_shared/std/concurrency.d (test for excess errors)
FAIL: 

[Bug tree-optimization/115147] exp2 with integer arguments could be translated into ldexp

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115147

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug tree-optimization/115149] [15 Regression] ICE on valid code at -O3 with "-fno-inline -fno-tree-vrp -fno-ipa-sra -fno-tree-dce -fno-tree-ch" on x86_64-linux-gnu: verify_ssa failed

2024-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115149

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |15.0
Summary|ICE on valid code at -O3|[15 Regression] ICE on
   |with "-fno-inline   |valid code at -O3 with
   |-fno-tree-vrp -fno-ipa-sra  |"-fno-inline -fno-tree-vrp
   |-fno-tree-dce -fno-tree-ch" |-fno-ipa-sra -fno-tree-dce
   |on x86_64-linux-gnu:|-fno-tree-ch" on
   |verify_ssa failed   |x86_64-linux-gnu:
   ||verify_ssa failed
   Keywords||ice-on-valid-code
Version|unknown |15.0

Results for 15.0.0 20240516 (experimental) [master r15-641-g5812e1bbb1c8a7] (GCC) testsuite on m68k-unknown-linux-gnu

2024-05-18 Thread Andreas Schwab
]*, 4, 0, 0);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 4, 5, 5);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 4, 4, 2);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 260, 5, 0);" 1
FAIL: c-c++-common/gomp/atomic-28.c  -std=c++20  scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 4, 0, 0);" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++98  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++14  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++17  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-3.c  -std=gnu++20  scan-tree-dump-times ompexp 
"xyzzy, 4" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++98  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++14  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++17  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1
FAIL: c-c++-common/gomp/atomic-9.c  -std=gnu++20  scan-tree-dump-times ompexp 
"__atomic_fetch_add" 1

=== g++ Summary ===

# of expected passes248838
# of unexpected failures113
# of expected failures  2602
# of unsupported tests  11628
/daten/aranym/gcc/gcc-20240518/Build/gcc/xg++  version 15.0.0 20240516 
(experimental) [master r15-641-g5812e1bbb1c8a7] (GCC) 

Host   is x86_64-suse-linux-gnu

=== gcc tests ===


Running target aranym
FAIL: gcc.c-torture/execute/pr97073.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O0  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O1  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O2  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O3 -g  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -Os  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/atomic/c11-atomic-exec-5.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/debug/btf/btf-bitfields-1.c scan-assembler-times [\\t 
]0x1340[\\t ]+[^\\n]*btm_offset 1
FAIL: gcc.dg/Warray-bounds-48-novec.c (test for excess errors)
FAIL: gcc.dg/builtin-object-size-20.c scan-tree-dump-not optimized "fail"
FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/memcmp-3.c (test for excess errors)
UNRESOLVED: gcc.dg/memcmp-3.c scan-tree-dump-not optimized "abort"
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3
FAIL: gcc.dg/pr46647.c scan-tree-dump-not optimized "memset"
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/pr87954.c scan-tree-dump-times optimized " *w? 
|WIDEN_MULT_PLUS_EXPR" 1
UNRESOLVED: gcc.dg/superblock.c scan-rtl-dump-times sched2 "ADVANCING TO" 2
FAIL: c-c++-common/auto-init-7.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT ((8|5), 2, &"temp4""
FAIL: c-c++-common/auto-init-8.c  -Wc++-compat   scan-tree-dump gimple "temp4 = 
.DEFERRED_INIT ((8|5), 1, &"temp4""
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 16 (test for warnings, 
line 15)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 24 (test for warnings, 
line 23)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 27 (test for warnings, 
line 26)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 30 (test for warnings, 
line 29)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 32 (test for warnings, 
line 31)
FAIL: c-c++-common/pr51628-3.c  -Wc++-compat   at line 34 (test for warnings, 
line 33)
FAIL: c-c++-common/gomp/allocate-10.c scan-tree-dump-times gimple "B1.[0-9]+ = 
__builtin_GOMP_alloc (4, 12, my_handle);" 1
FAIL: c-c++-common/gomp/atomic-10.c scan-tree-dump-times ompexp 
"__atomic_fetch_add" 4
FAIL: c-c++-common/gomp/atomic-28.c scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 4, 5, 5);" 1
FAIL: c-c++-common/gomp/atomic-28.c scan-tree-dump-times ompexp 
".ATOMIC_COMPARE_EXCHANGE ([^\\n\\r]*, 

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: Fix "Nan-box the result of movbf on soft-bf16"

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:a5445260bd42d74aabe6c11d6207d113aafe2c8c

commit a5445260bd42d74aabe6c11d6207d113aafe2c8c
Author: Xiao Zeng 
Date:   Wed May 15 16:23:16 2024 +0800

RISC-V: Fix "Nan-box the result of movbf on soft-bf16"

1 According to unpriv-isa spec:


  1.1 "FMV.H.X moves the half-precision value encoded in IEEE 754-2008
  standard encoding from the lower 16 bits of integer register rs1
  to the floating-point register rd, NaN-boxing the result."
  1.2 "FMV.W.X moves the single-precision value encoded in IEEE 754-2008
  standard encoding from the lower 32 bits of integer register rs1
  to the floating-point register rd. The bits are not modified in the
  transfer, and in particular, the payloads of non-canonical NaNs are 
preserved."

2 When (!TARGET_ZFHMIN == true && TARGET_HARD_FLOAT == true), instruction 
needs
to be added to complete the Nan-box, as done in
"RISC-V: Nan-box the result of movhf on soft-fp16":



3 Consider the "RISC-V: Nan-box the result of movbf on soft-bf16" in:


It ignores that both hf16 and bf16 are 16bits floating-point.

4 zfbfmin -> zfhmin in:



gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_legitimize_move): Optimize movbf
with Nan-boxing value.
* config/riscv/riscv.md (*movhf_softfloat_boxing): Expand movbf
with Nan-boxing value.
(*mov_softfloat_boxing): Ditto.
with Nan-boxing value.
(*movbf_softfloat_boxing): Delete abandon pattern.

(cherry picked from commit 7422e050f33dd9ee7dcd5a72c80b4e11d61995ce)

Diff:
---
 gcc/config/riscv/riscv.cc | 15 ++-
 gcc/config/riscv/riscv.md | 19 +--
 2 files changed, 11 insertions(+), 23 deletions(-)

diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 2be04ec6bc5e..7a34b4be873f 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -3192,13 +3192,12 @@ riscv_legitimize_move (machine_mode mode, rtx dest, rtx 
src)
  (set (reg:SI/DI mask) (const_int -65536)
  (set (reg:SI/DI temp) (zero_extend:SI/DI (subreg:HI (reg:HF/BF src) 0)))
  (set (reg:SI/DI temp) (ior:SI/DI (reg:SI/DI mask) (reg:SI/DI temp)))
- (set (reg:HF/BF dest) (unspec:HF/BF[ (reg:SI/DI temp) ]
-   UNSPEC_FMV_SFP16_X/UNSPEC_FMV_SBF16_X))
- */
+ (set (reg:HF/BF dest) (unspec:HF/BF[ (reg:SI/DI temp) ] 
UNSPEC_FMV_FP16_X))
+  */
 
   if (TARGET_HARD_FLOAT
-  && ((!TARGET_ZFHMIN && mode == HFmode)
- || (!TARGET_ZFBFMIN && mode == BFmode))
+  && !TARGET_ZFHMIN
+  && (mode == HFmode || mode == BFmode)
   && REG_P (dest) && FP_REG_P (REGNO (dest))
   && REG_P (src) && !FP_REG_P (REGNO (src))
   && can_create_pseudo_p ())
@@ -3213,10 +3212,8 @@ riscv_legitimize_move (machine_mode mode, rtx dest, rtx 
src)
   else
emit_insn (gen_iordi3 (temp, mask, temp));
 
-  riscv_emit_move (dest,
-  gen_rtx_UNSPEC (mode, gen_rtvec (1, temp),
-  mode == HFmode ? UNSPEC_FMV_SFP16_X
- : UNSPEC_FMV_SBF16_X));
+  riscv_emit_move (dest, gen_rtx_UNSPEC (mode, gen_rtvec (1, temp),
+UNSPEC_FMV_FP16_X));
 
   return true;
 }
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index 04f54cedad94..ff4557c1325f 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -87,8 +87,7 @@
   UNSPEC_STRLEN
 
   ;; Workaround for HFmode and BFmode without hardware extension
-  UNSPEC_FMV_SFP16_X
-  UNSPEC_FMV_SBF16_X
+  UNSPEC_FMV_FP16_X
 
   ;; XTheadFmv moves
   UNSPEC_XTHEADFMV
@@ -1959,23 +1958,15 @@
(set_attr "type" "fmove,move,load,store,mtc,mfc")
(set_attr "mode" "")])
 
-(define_insn "*movhf_softfloat_boxing"
-  [(set (match_operand:HF 0 "register_operand""=f")
-(unspec:HF [(match_operand:X 1 "register_operand" " r")] 
UNSPEC_FMV_SFP16_X))]
+(define_insn "*mov_softfloat_boxing"
+  [(set (match_operand:HFBF 0 "register_operand"   "=f")
+   (unspec:HFBF [(match_operand:X 1 "register_operand" " r")]
+UNSPEC_FMV_FP16_X))]
   "!TARGET_ZFHMIN"
   "fmv.w.x\t%0,%1"
   [(set_attr "type" "fmove")
(set_attr "mode" "SF")])
 
-(define_insn "*movbf_softfloat_boxing"
-  [(set (match_operand:BF 0 "register_operand"   "=f")
-   (unspec:BF [(match_operand:X 1 "register_operand" " r")]
-UNSPEC_FMV_SBF16_X))]
-  "!TARGET_ZFBFMIN"

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: Modify _Bfloat16 to __bf16

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:af9118f721e8d586049ff4a60ff7bc5507478344

commit af9118f721e8d586049ff4a60ff7bc5507478344
Author: Xiao Zeng 
Date:   Fri May 17 13:48:21 2024 +0800

RISC-V: Modify _Bfloat16 to __bf16

According to the description in:
,
the type representation symbol of BF16 has been corrected.

Kito Cheng pointed out relevant information in the email:


gcc/ChangeLog:

* config/riscv/riscv-builtins.cc (riscv_init_builtin_types):
Modify _Bfloat16 to __bf16.
* config/riscv/riscv.cc (riscv_mangle_type): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/_Bfloat16-nanboxing.c: Move to...
* gcc.target/riscv/__bf16-nanboxing.c: ...here.
* gcc.target/riscv/bf16_arithmetic.c: Modify _Bfloat16 to __bf16.
* gcc.target/riscv/bf16_call.c: Ditto.
* gcc.target/riscv/bf16_comparison.c: Ditto.
* gcc.target/riscv/bf16_float_libcall_convert.c: Ditto.
* gcc.target/riscv/bf16_integer_libcall_convert.c: Ditto.

(cherry picked from commit 6da1d6efde2282e6582c00d1631e7457975ad998)

Diff:
---
 gcc/config/riscv/riscv-builtins.cc   |  6 +++---
 gcc/config/riscv/riscv.cc|  2 +-
 .../riscv/{_Bfloat16-nanboxing.c => __bf16-nanboxing.c}  | 12 ++--
 gcc/testsuite/gcc.target/riscv/bf16_arithmetic.c |  6 +++---
 gcc/testsuite/gcc.target/riscv/bf16_call.c   |  4 ++--
 gcc/testsuite/gcc.target/riscv/bf16_comparison.c |  6 +++---
 gcc/testsuite/gcc.target/riscv/bf16_float_libcall_convert.c  |  2 +-
 .../gcc.target/riscv/bf16_integer_libcall_convert.c  |  2 +-
 8 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/gcc/config/riscv/riscv-builtins.cc 
b/gcc/config/riscv/riscv-builtins.cc
index 4c08834288ac..dc54e1a59b52 100644
--- a/gcc/config/riscv/riscv-builtins.cc
+++ b/gcc/config/riscv/riscv-builtins.cc
@@ -275,7 +275,7 @@ riscv_init_builtin_types (void)
 lang_hooks.types.register_builtin_type (riscv_float16_type_node,
"_Float16");
 
-  /* Provide the _Bfloat16 type and bfloat16_type_node if needed.  */
+  /* Provide the __bf16 type and bfloat16_type_node if needed.  */
   if (!bfloat16_type_node)
 {
   riscv_bfloat16_type_node = make_node (REAL_TYPE);
@@ -286,9 +286,9 @@ riscv_init_builtin_types (void)
   else
 riscv_bfloat16_type_node = bfloat16_type_node;
 
-  if (!maybe_get_identifier ("_Bfloat16"))
+  if (!maybe_get_identifier ("__bf16"))
 lang_hooks.types.register_builtin_type (riscv_bfloat16_type_node,
-   "_Bfloat16");
+   "__bf16");
 }
 
 /* Implement TARGET_INIT_BUILTINS.  */
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 9ac2be87acd2..2be04ec6bc5e 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -10276,7 +10276,7 @@ riscv_asan_shadow_offset (void)
 static const char *
 riscv_mangle_type (const_tree type)
 {
-  /* Half-precision float, _Float16 is "DF16_" and _Bfloat16 is "DF16b".  */
+  /* Half-precision float, _Float16 is "DF16_" and __bf16 is "DF16b".  */
   if (SCALAR_FLOAT_TYPE_P (type) && TYPE_PRECISION (type) == 16)
 {
   if (TYPE_MODE (type) == HFmode)
diff --git a/gcc/testsuite/gcc.target/riscv/_Bfloat16-nanboxing.c 
b/gcc/testsuite/gcc.target/riscv/__bf16-nanboxing.c
similarity index 83%
rename from gcc/testsuite/gcc.target/riscv/_Bfloat16-nanboxing.c
rename to gcc/testsuite/gcc.target/riscv/__bf16-nanboxing.c
index 11a73d222345..a9a586c98b9c 100644
--- a/gcc/testsuite/gcc.target/riscv/_Bfloat16-nanboxing.c
+++ b/gcc/testsuite/gcc.target/riscv/__bf16-nanboxing.c
@@ -1,14 +1,14 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv64ifd -mabi=lp64d -mcmodel=medlow -O" } */
 
-_Bfloat16 gvar = 9.87654;
+__bf16 gvar = 9.87654;
 union U
 {
   unsigned short i16;
-  _Bfloat16 f16;
+  __bf16 f16;
 };
 
-_Bfloat16
+__bf16
 test1 (unsigned short input)
 {
   union U tmp;
@@ -16,19 +16,19 @@ test1 (unsigned short input)
   return tmp.f16;
 }
 
-_Bfloat16
+__bf16
 test2 ()
 {
   return 1.234f;
 }
 
-_Bfloat16
+__bf16
 test3 ()
 {
   return gvar;
 }
 
-_Bfloat16
+__bf16
 test ()
 {
   return 0.0f;
diff --git a/gcc/testsuite/gcc.target/riscv/bf16_arithmetic.c 
b/gcc/testsuite/gcc.target/riscv/bf16_arithmetic.c
index 9e4850512600..190cc1d574a6 100644
--- a/gcc/testsuite/gcc.target/riscv/bf16_arithmetic.c
+++ b/gcc/testsuite/gcc.target/riscv/bf16_arithmetic.c
@@ -5,9 +5,9 @@
 /* 1) bf -> sf  (call  __extendbfsf2)  */
 /* 2) sf1 [+|-|*|/] sf2 (call  __[add|sub|mul|div]sf3)  */
 /* 3) sf -> bf  (call  __truncsfbf2)  */
-extern _Bfloat16 bf;
-extern _Bfloat16 bf1;

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: Add initial cost handling for segment loads/stores.

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:d6cb9a0d984a6c9ea0b548178a5cf79629be073b

commit d6cb9a0d984a6c9ea0b548178a5cf79629be073b
Author: Robin Dapp 
Date:   Mon Feb 26 13:09:15 2024 +0100

RISC-V: Add initial cost handling for segment loads/stores.

This patch makes segment loads and stores more expensive.  It adds
segment_permute_2 as well as 3 to 8 cost fields to the common vector
costs and adds handling to adjust_stmt_cost.

gcc/ChangeLog:

* config/riscv/riscv-protos.h (struct common_vector_cost): Add
segment_permute cost.
* config/riscv/riscv-vector-costs.cc (costs::adjust_stmt_cost):
Handle segment loads/stores.
* config/riscv/riscv.cc: Initialize segment_permute_[2-8] to 1.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/costmodel/riscv/rvv/pr113112-4.c: Adjust test.

(cherry picked from commit e0b9c8ad7098fb08a25a61fe17d4274dd73e5145)

Diff:
---
 gcc/config/riscv/riscv-protos.h|   9 ++
 gcc/config/riscv/riscv-vector-costs.cc | 163 +++--
 gcc/config/riscv/riscv.cc  |  14 ++
 .../gcc.dg/vect/costmodel/riscv/rvv/pr113112-4.c   |   4 +-
 4 files changed, 146 insertions(+), 44 deletions(-)

diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-protos.h
index 565ead1382a7..004ceb1031b8 100644
--- a/gcc/config/riscv/riscv-protos.h
+++ b/gcc/config/riscv/riscv-protos.h
@@ -222,6 +222,15 @@ struct common_vector_cost
   const int gather_load_cost;
   const int scatter_store_cost;
 
+  /* Segment load/store permute cost.  */
+  const int segment_permute_2;
+  const int segment_permute_3;
+  const int segment_permute_4;
+  const int segment_permute_5;
+  const int segment_permute_6;
+  const int segment_permute_7;
+  const int segment_permute_8;
+
   /* Cost of a vector-to-scalar operation.  */
   const int vec_to_scalar_cost;
 
diff --git a/gcc/config/riscv/riscv-vector-costs.cc 
b/gcc/config/riscv/riscv-vector-costs.cc
index 4582b0db4250..0a88e142a934 100644
--- a/gcc/config/riscv/riscv-vector-costs.cc
+++ b/gcc/config/riscv/riscv-vector-costs.cc
@@ -1052,6 +1052,25 @@ costs::better_main_loop_than_p (const vector_costs 
*uncast_other) const
   return vector_costs::better_main_loop_than_p (other);
 }
 
+/* Returns the group size i.e. the number of vectors to be loaded by a
+   segmented load/store instruction.  Return 0 if it is no segmented
+   load/store.  */
+static int
+segment_loadstore_group_size (enum vect_cost_for_stmt kind,
+ stmt_vec_info stmt_info)
+{
+  if (stmt_info
+  && (kind == vector_load || kind == vector_store)
+  && STMT_VINFO_DATA_REF (stmt_info))
+{
+  stmt_info = DR_GROUP_FIRST_ELEMENT (stmt_info);
+  if (stmt_info
+ && STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info) == VMAT_LOAD_STORE_LANES)
+   return DR_GROUP_SIZE (stmt_info);
+}
+  return 0;
+}
+
 /* Adjust vectorization cost after calling riscv_builtin_vectorization_cost.
For some statement, we would like to further fine-grain tweak the cost on
top of riscv_builtin_vectorization_cost handling which doesn't have any
@@ -1076,55 +1095,115 @@ costs::adjust_stmt_cost (enum vect_cost_for_stmt kind, 
loop_vec_info loop,
 case vector_load:
 case vector_store:
{
- /* Unit-stride vector loads and stores do not have offset addressing
-as opposed to scalar loads and stores.
-If the address depends on a variable we need an additional
-add/sub for each load/store in the worst case.  */
- if (stmt_info && stmt_info->stmt)
+ if (stmt_info && stmt_info->stmt && STMT_VINFO_DATA_REF (stmt_info))
{
- data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
- class loop *father = stmt_info->stmt->bb->loop_father;
- if (!loop && father && !father->inner && father->superloops)
+ /* Segment loads and stores.  When the group size is > 1
+the vectorizer will add a vector load/store statement for
+each vector in the group.  Here we additionally add permute
+costs for each.  */
+ /* TODO: Indexed and ordered/unordered cost.  */
+ int group_size = segment_loadstore_group_size (kind, stmt_info);
+ if (group_size > 1)
+   {
+ switch (group_size)
+   {
+   case 2:
+ if (riscv_v_ext_vector_mode_p (loop->vector_mode))
+   stmt_cost += costs->vla->segment_permute_2;
+ else
+   stmt_cost += costs->vls->segment_permute_2;
+ break;
+   case 3:
+ if (riscv_v_ext_vector_mode_p (loop->vector_mode))
+   stmt_cost += costs->vla->segment_permute_3;
+ else
+   

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: Implement IFN SAT_ADD for both the scalar and vector

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:db2b829f4d45c6f14724148d1f8b2066290b3371

commit db2b829f4d45c6f14724148d1f8b2066290b3371
Author: Pan Li 
Date:   Fri May 17 18:49:46 2024 +0800

RISC-V: Implement IFN SAT_ADD for both the scalar and vector

The patch implement the SAT_ADD in the riscv backend as the
sample for both the scalar and vector.  Given below vector
as example:

void vec_sat_add_u64 (uint64_t *out, uint64_t *x, uint64_t *y, unsigned n)
{
  unsigned i;

  for (i = 0; i < n; i++)
out[i] = (x[i] + y[i]) | (- (uint64_t)((uint64_t)(x[i] + y[i]) < x[i]));
}

Before this patch:
vec_sat_add_u64:
  ...
  vsetvli a5,a3,e64,m1,ta,ma
  vle64.v v0,0(a1)
  vle64.v v1,0(a2)
  sllia4,a5,3
  sub a3,a3,a5
  add a1,a1,a4
  add a2,a2,a4
  vadd.vv v1,v0,v1
  vmsgtu.vv   v0,v0,v1
  vmerge.vim  v1,v1,-1,v0
  vse64.v v1,0(a0)
  ...

After this patch:
vec_sat_add_u64:
  ...
  vsetvli a5,a3,e64,m1,ta,ma
  vle64.v v1,0(a1)
  vle64.v v2,0(a2)
  sllia4,a5,3
  sub a3,a3,a5
  add a1,a1,a4
  add a2,a2,a4
  vsaddu.vv   v1,v1,v2  <=  Vector Single-Width Saturating Add
  vse64.v v1,0(a0)
  ...

The below test suites are passed for this patch.
* The riscv fully regression tests.
* The aarch64 fully regression tests.
* The x86 bootstrap tests.
* The x86 fully regression tests.

PR target/51492
PR target/112600

gcc/ChangeLog:

* config/riscv/autovec.md (usadd3): New pattern expand for
the unsigned SAT_ADD in vector mode.
* config/riscv/riscv-protos.h (riscv_expand_usadd): New func decl
to expand usadd3 pattern.
(expand_vec_usadd): Ditto but for vector.
* config/riscv/riscv-v.cc (emit_vec_saddu): New func impl to emit
the vsadd insn.
(expand_vec_usadd): New func impl to expand usadd3 for vector.
* config/riscv/riscv.cc (riscv_expand_usadd): New func impl to
expand usadd3 for scalar.
* config/riscv/riscv.md (usadd3): New pattern expand for
the unsigned SAT_ADD in scalar mode.
* config/riscv/vector.md: Allow VLS mode for vsaddu.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/binop/vec_sat_binary.h: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-1.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-2.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-3.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-4.c: New test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-1.c: New 
test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-2.c: New 
test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-3.c: New 
test.
* gcc.target/riscv/rvv/autovec/binop/vec_sat_u_add-run-4.c: New 
test.
* gcc.target/riscv/sat_arith.h: New test.
* gcc.target/riscv/sat_u_add-1.c: New test.
* gcc.target/riscv/sat_u_add-2.c: New test.
* gcc.target/riscv/sat_u_add-3.c: New test.
* gcc.target/riscv/sat_u_add-4.c: New test.
* gcc.target/riscv/sat_u_add-run-1.c: New test.
* gcc.target/riscv/sat_u_add-run-2.c: New test.
* gcc.target/riscv/sat_u_add-run-3.c: New test.
* gcc.target/riscv/sat_u_add-run-4.c: New test.
* gcc.target/riscv/scalar_sat_binary.h: New test.

Signed-off-by: Pan Li 
(cherry picked from commit 34ed2b4593fa98b613632d0dde30b6ba3e7ecad9)

Diff:
---
 gcc/config/riscv/autovec.md| 17 +
 gcc/config/riscv/riscv-protos.h|  2 +
 gcc/config/riscv/riscv-v.cc| 19 ++
 gcc/config/riscv/riscv.cc  | 55 
 gcc/config/riscv/riscv.md  | 11 
 gcc/config/riscv/vector.md | 12 ++--
 .../riscv/rvv/autovec/binop/vec_sat_binary.h   | 33 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-1.c  | 19 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-2.c  | 20 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-3.c  | 20 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-4.c  | 20 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-run-1.c  | 75 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-run-2.c  | 75 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-run-3.c  | 75 ++
 .../riscv/rvv/autovec/binop/vec_sat_u_add-run-4.c  | 75 ++
 gcc/testsuite/gcc.target/riscv/sat_arith.h | 31 +
 gcc/testsuite/gcc.target/riscv/sat_u_add-1.c   | 19 ++
 

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] internal-fn: Do not force vcond_mask operands to reg.

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:17dfc9744f4995d3161eeba104bd86391005769b

commit 17dfc9744f4995d3161eeba104bd86391005769b
Author: Robin Dapp 
Date:   Fri May 10 12:44:44 2024 +0200

internal-fn: Do not force vcond_mask operands to reg.

In order to directly use constants this patch removes force_regs
in the vcond_mask expander.

gcc/ChangeLog:

PR middle-end/113474

* internal-fn.cc (expand_vec_cond_mask_optab_fn):  Remove
force_regs.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/pr113474.c: New test.

(cherry picked from commit 7ca35f2e430081d6ec91e910002f92d9713350fa)

Diff:
---
 gcc/internal-fn.cc|  3 ---
 gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113474.c | 13 +
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc
index 73045ca8c8c1..9c09026793fa 100644
--- a/gcc/internal-fn.cc
+++ b/gcc/internal-fn.cc
@@ -3165,9 +3165,6 @@ expand_vec_cond_mask_optab_fn (internal_fn, gcall *stmt, 
convert_optab optab)
   rtx_op1 = expand_normal (op1);
   rtx_op2 = expand_normal (op2);
 
-  mask = force_reg (mask_mode, mask);
-  rtx_op1 = force_reg (mode, rtx_op1);
-
   rtx target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE);
   create_output_operand ([0], target, mode);
   create_input_operand ([1], rtx_op1, mode);
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113474.c 
b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113474.c
new file mode 100644
index ..0364bf9f5e38
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr113474.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target riscv_v } }  */
+/* { dg-additional-options "-std=c99" }  */
+
+void
+foo (int n, int **a)
+{
+  int b;
+  for (b = 0; b < n; b++)
+for (long e = 8; e > 0; e--)
+  a[b][e] = a[b][e] == 15;
+}
+
+/* { dg-final { scan-assembler "vmerge.vim" } }  */


[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: Cleanup some temporally files [NFC]

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:586e678cd18c8d7a72e5f785094d911a098092ff

commit 586e678cd18c8d7a72e5f785094d911a098092ff
Author: Pan Li 
Date:   Fri May 17 07:45:19 2024 +0800

RISC-V: Cleanup some temporally files [NFC]

Just notice some temporally files under gcc/config/riscv,
deleted as useless.

* Empty file j.
* Vim swap file.

gcc/ChangeLog:

* config/riscv/.riscv.cc.swo: Removed.
* config/riscv/j: Removed.

Signed-off-by: Pan Li 
(cherry picked from commit d477d683d5c6db90c80d348c795709ae6444ba7a)

Diff:
---
 gcc/config/riscv/.riscv.cc.swo | Bin 417792 -> 0 bytes
 gcc/config/riscv/j |   0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/gcc/config/riscv/.riscv.cc.swo b/gcc/config/riscv/.riscv.cc.swo
deleted file mode 100644
index 77ed37353bee..
Binary files a/gcc/config/riscv/.riscv.cc.swo and /dev/null differ
diff --git a/gcc/config/riscv/j b/gcc/config/riscv/j
deleted file mode 100644
index e69de29bb2d1..


[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: Enable vectorizable early exit testsuite

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:c1ad575242ff3dee66f2775412b1c65efbc2269b

commit c1ad575242ff3dee66f2775412b1c65efbc2269b
Author: Pan Li 
Date:   Thu May 16 10:04:10 2024 +0800

RISC-V: Enable vectorizable early exit testsuite

After we supported vectorizable early exit in RISC-V,  we would like to
enable the gcc vect test for vectorizable early test.

The vect-early-break_124-pr114403.c failed to vectorize for now.
Because that the __builtin_memcpy with 8 bytes failed to folded into
int64 assignment during ccp1.  We will improve that first and mark
this as xfail for RISC-V.

The below tests are passed for this patch:
1. The riscv fully regression tests.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-mask-store-1.c: Add pragma novector as it will
have 2 times LOOP VECTORIZED in RISC-V.
* gcc.dg/vect/vect-early-break_124-pr114403.c: Xfail for the
riscv backend.
* lib/target-supports.exp: Add RISC-V backend.

Signed-off-by: Pan Li 
(cherry picked from commit 556e777298dac8574533935000c57335c5232921)

Diff:
---
 gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c  | 2 ++
 gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c | 2 +-
 gcc/testsuite/lib/target-supports.exp | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c 
b/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c
index fdd9032da98a..2f80bf89e5e6 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-mask-store-1.c
@@ -28,6 +28,8 @@ main ()
 
   if (__builtin_memcmp (x, res, sizeof (x)) != 0)
 abort ();
+
+#pragma GCC novector
   for (int i = 0; i < 32; ++i)
 if (flag[i] != 0 && flag[i] != 1)
   abort ();
diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c 
b/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c
index 51abf245ccb5..101ae1e0eaa1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c
@@ -2,7 +2,7 @@
 /* { dg-require-effective-target vect_early_break_hw } */
 /* { dg-require-effective-target vect_long_long } */
 
-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { xfail riscv*-*-* } } 
} */
 
 #include "tree-vect.h"
 
diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 3a55b2a4159c..6c828b73ded3 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4105,6 +4105,7 @@ proc check_effective_target_vect_early_break { } {
|| [check_effective_target_arm_v8_neon_ok]
|| [check_effective_target_sse4]
|| [istarget amdgcn-*-*]
+   || [check_effective_target_riscv_v]
}}]
 }
 
@@ -4120,6 +4121,7 @@ proc check_effective_target_vect_early_break_hw { } {
|| [check_effective_target_arm_v8_neon_hw]
|| [check_sse4_hw_available]
|| [istarget amdgcn-*-*]
+   || [check_effective_target_riscv_v_ok]
}}]
 }


[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: Implement vectorizable early exit with vcond_mask_len

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:b1aab03aed7f3d8c9b104b5f596e7e9853b8d5e6

commit b1aab03aed7f3d8c9b104b5f596e7e9853b8d5e6
Author: Pan Li 
Date:   Thu May 16 10:02:40 2024 +0800

RISC-V: Implement vectorizable early exit with vcond_mask_len

After we support the loop lens for the vectorizable,  we would like to
implement the feature for the RISC-V target.  Given below example:

unsigned vect_a[1923];
unsigned vect_b[1923];

void test (unsigned limit, int n)
{
  for (int i = 0; i < n; i++)
{
  vect_b[i] = limit + i;

  if (vect_a[i] > limit)
{
  ret = vect_b[i];
  return ret;
}

  vect_a[i] = limit;
}
}

Before this patch:
  ...
.L8:
  swa3,0(a5)
  addiw a0,a0,1
  addi  a4,a4,4
  addi  a5,a5,4
  beq   a1,a0,.L2
.L4:
  swa0,0(a4)
  lwa2,0(a5)
  bleu  a2,a3,.L8
  ret

After this patch:
  ...
.L5:
  vsetvli   a5,a3,e8,mf4,ta,ma
  vmv1r.v   v4,v2
  vsetvli   t4,zero,e32,m1,ta,ma
  vmv.v.x   v1,a5
  vadd.vv   v2,v2,v1
  vsetvli   zero,a5,e32,m1,ta,ma
  vadd.vv   v5,v4,v3
  slli  a6,a5,2
  vle32.v   v1,0(t1)
  vmsltu.vv v1,v3,v1
  vcpop.m   t4,v1
  beq   t4,zero,.L4
  vmv.x.s   a4,v4
.L3:
  ...

The below tests are passed for this patch:
1. The riscv fully regression tests.

gcc/ChangeLog:

* 
config/riscv/autovec-opt.md(*vcond_mask_len_popcount_):
New pattern of vcond_mask_len_popcount for vector bool mode.
* config/riscv/autovec.md (vcond_mask_len_): New pattern of
vcond_mask_len for vector bool mode.
(cbranch4): New pattern for vector bool mode.
* config/riscv/vector-iterators.md: Add new unspec 
UNSPEC_SELECT_MASK.
* config/riscv/vector.md (@pred_popcount): Add VLS 
mode
to popcount pattern.
(@pred_popcount): Ditto.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/early-break-1.c: New test.
* gcc.target/riscv/rvv/autovec/early-break-2.c: New test.

Signed-off-by: Pan Li 
(cherry picked from commit 6c1de786e53a11150feb16ba990d0d6c6fd910db)

Diff:
---
 gcc/config/riscv/autovec-opt.md| 33 
 gcc/config/riscv/autovec.md| 61 ++
 gcc/config/riscv/vector-iterators.md   |  1 +
 gcc/config/riscv/vector.md | 18 +++
 .../gcc.target/riscv/rvv/autovec/early-break-1.c   | 34 
 .../gcc.target/riscv/rvv/autovec/early-break-2.c   | 37 +
 6 files changed, 175 insertions(+), 9 deletions(-)

diff --git a/gcc/config/riscv/autovec-opt.md b/gcc/config/riscv/autovec-opt.md
index 645dc53d8680..04f85d8e4553 100644
--- a/gcc/config/riscv/autovec-opt.md
+++ b/gcc/config/riscv/autovec-opt.md
@@ -1436,3 +1436,36 @@
 DONE;
   }
   [(set_attr "type" "vmalu")])
+
+;; Optimization pattern for early break auto-vectorization
+;; vcond_mask_len (mask, ones, zeros, len, bias) + vlmax popcount
+;; -> non vlmax popcount (mask, len)
+(define_insn_and_split "*vcond_mask_len_popcount_"
+  [(set (match_operand:P 0 "register_operand")
+(popcount:P
+ (unspec:VB_VLS [
+  (unspec:VB_VLS [
+   (match_operand:VB_VLS 1 "register_operand")
+   (match_operand:VB_VLS 2 "const_1_operand")
+   (match_operand:VB_VLS 3 "const_0_operand")
+   (match_operand 4 "autovec_length_operand")
+   (match_operand 5 "const_0_operand")] UNSPEC_SELECT_MASK)
+  (match_operand 6 "autovec_length_operand")
+  (const_int 1)
+  (reg:SI VL_REGNUM)
+  (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)))]
+  "TARGET_VECTOR
+   && can_create_pseudo_p ()
+   && riscv_vector::get_vector_mode (Pmode, GET_MODE_NUNITS 
(mode)).exists ()"
+  "#"
+  "&& 1"
+  [(const_int 0)]
+  {
+riscv_vector::emit_nonvlmax_insn (
+   code_for_pred_popcount (mode, Pmode),
+   riscv_vector::CPOP_OP,
+   operands, operands[4]);
+DONE;
+  }
+  [(set_attr "type" "vector")]
+)
diff --git a/gcc/config/riscv/autovec.md b/gcc/config/riscv/autovec.md
index aa1ae0fe075b..1ee3c8052fb4 100644
--- a/gcc/config/riscv/autovec.md
+++ b/gcc/config/riscv/autovec.md
@@ -2612,3 +2612,64 @@
 DONE;
   }
 )
+
+;; =
+;; == Early break auto-vectorization patterns
+;; =
+
+;; vcond_mask_len (mask, 1s, 0s, len, bias)
+;; => mask[i] = mask[i] && i < len ? 1 : 0
+(define_insn_and_split "vcond_mask_len_"
+  [(set (match_operand:VB 0 "register_operand")
+(unspec: VB [
+ (match_operand:VB 1 "register_operand")
+ (match_operand:VB 2 "const_1_operand")
+ (match_operand:VB 3 "const_0_operand")
+ (match_operand 4 

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] Vect: Support loop len in vectorizable early exit

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:4ec3a6b6022c1853cfd5866dea0324a4002413b2

commit 4ec3a6b6022c1853cfd5866dea0324a4002413b2
Author: Pan Li 
Date:   Thu May 16 09:58:13 2024 +0800

Vect: Support loop len in vectorizable early exit

This patch adds early break auto-vectorization support for target which
use length on partial vectorization.  Consider this following example:

unsigned vect_a[802];
unsigned vect_b[802];

void test (unsigned x, int n)
{
  for (int i = 0; i < n; i++)
  {
vect_b[i] = x + i;

if (vect_a[i] > x)
  break;

vect_a[i] = x;
  }
}

We use VCOND_MASK_LEN to simulate the generate (mask && i < len + bias).
And then the IR of RVV looks like below:

  ...
  _87 = .SELECT_VL (ivtmp_85, POLY_INT_CST [32, 32]);
  _55 = (int) _87;
  ...
  mask_patt_6.13_69 = vect_cst__62 < vect__3.12_67;
  vec_len_mask_72 = .VCOND_MASK_LEN (mask_patt_6.13_69, { -1, ... }, \
{0, ... }, _87, 0);
  if (vec_len_mask_72 != { 0, ... })
goto ; [5.50%]
  else
goto ; [94.50%]

The below tests are passed for this patch:
1. The riscv fully regression tests.
2. The x86 bootstrap tests.
3. The x86 fully regression tests.

gcc/ChangeLog:

* tree-vect-loop.cc (vect_gen_loop_len_mask): New func to gen
the loop len mask.
* tree-vect-stmts.cc (vectorizable_early_exit): Invoke the
vect_gen_loop_len_mask for 1 or more stmt(s).
* tree-vectorizer.h (vect_gen_loop_len_mask): New func decl
for vect_gen_loop_len_mask.

Signed-off-by: Pan Li 
(cherry picked from commit 57f8a2f67c1536be23231808ab00613ab69193ed)

Diff:
---
 gcc/tree-vect-loop.cc  | 27 +++
 gcc/tree-vect-stmts.cc | 17 +++--
 gcc/tree-vectorizer.h  |  4 
 3 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 29c03c246d45..6ff3ca09dc6a 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -11394,6 +11394,33 @@ vect_get_loop_len (loop_vec_info loop_vinfo, 
gimple_stmt_iterator *gsi,
   return loop_len;
 }
 
+/* Generate the tree for the loop len mask and return it.  Given the lens,
+   nvectors, vectype, index and factor to gen the len mask as below.
+
+   tree len_mask = VCOND_MASK_LEN (compare_mask, ones, zero, len, bias)
+*/
+tree
+vect_gen_loop_len_mask (loop_vec_info loop_vinfo, gimple_stmt_iterator *gsi,
+   gimple_stmt_iterator *cond_gsi, vec_loop_lens *lens,
+   unsigned int nvectors, tree vectype, tree stmt,
+   unsigned int index, unsigned int factor)
+{
+  tree all_one_mask = build_all_ones_cst (vectype);
+  tree all_zero_mask = build_zero_cst (vectype);
+  tree len = vect_get_loop_len (loop_vinfo, gsi, lens, nvectors, vectype, 
index,
+   factor);
+  tree bias = build_int_cst (intQI_type_node,
+LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo));
+  tree len_mask = make_temp_ssa_name (TREE_TYPE (stmt), NULL, "vec_len_mask");
+  gcall *call = gimple_build_call_internal (IFN_VCOND_MASK_LEN, 5, stmt,
+   all_one_mask, all_zero_mask, len,
+   bias);
+  gimple_call_set_lhs (call, len_mask);
+  gsi_insert_before (cond_gsi, call, GSI_SAME_STMT);
+
+  return len_mask;
+}
+
 /* Scale profiling counters by estimation for LOOP which is vectorized
by factor VF.
If FLAT is true, the loop we started with had unrealistically flat
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index f8d8636b139a..d592dff73e33 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -12893,7 +12893,9 @@ vectorizable_early_exit (vec_info *vinfo, stmt_vec_info 
stmt_info,
 ncopies = vect_get_num_copies (loop_vinfo, vectype);
 
   vec_loop_masks *masks = _VINFO_MASKS (loop_vinfo);
+  vec_loop_lens *lens = _VINFO_LENS (loop_vinfo);
   bool masked_loop_p = LOOP_VINFO_FULLY_MASKED_P (loop_vinfo);
+  bool len_loop_p = LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo);
 
   /* Now build the new conditional.  Pattern gimple_conds get dropped during
  codegen so we must replace the original insn.  */
@@ -12957,12 +12959,11 @@ vectorizable_early_exit (vec_info *vinfo, 
stmt_vec_info stmt_info,
{
  if (direct_internal_fn_supported_p (IFN_VCOND_MASK_LEN, vectype,
  OPTIMIZE_FOR_SPEED))
-   return false;
+   vect_record_loop_len (loop_vinfo, lens, ncopies, vectype, 1);
  else
vect_record_loop_mask (loop_vinfo, masks, ncopies, vectype, NULL);
}
 
-
   return true;
 }
 
@@ -13015,6 +13016,15 @@ vectorizable_early_exit (vec_info *vinfo, 
stmt_vec_info stmt_info,
  

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:51b69c80a76ba767ed166e93a569a84dae445b23

commit 51b69c80a76ba767ed166e93a569a84dae445b23
Author: Pan Li 
Date:   Wed May 15 10:14:05 2024 +0800

Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

This patch would like to add the middle-end presentation for the
saturation add.  Aka set the result of add to the max when overflow.
It will take the pattern similar as below.

SAT_ADD (x, y) => (x + y) | (-(TYPE)((TYPE)(x + y) < x))

Take uint8_t as example, we will have:

* SAT_ADD (1, 254)   => 255.
* SAT_ADD (1, 255)   => 255.
* SAT_ADD (2, 255)   => 255.
* SAT_ADD (255, 255) => 255.

Given below example for the unsigned scalar integer uint64_t:

uint64_t sat_add_u64 (uint64_t x, uint64_t y)
{
  return (x + y) | (- (uint64_t)((uint64_t)(x + y) < x));
}

Before this patch:
uint64_t sat_add_uint64_t (uint64_t x, uint64_t y)
{
  long unsigned int _1;
  _Bool _2;
  long unsigned int _3;
  long unsigned int _4;
  uint64_t _7;
  long unsigned int _10;
  __complex__ long unsigned int _11;

;;   basic block 2, loop depth 0
;;pred:   ENTRY
  _11 = .ADD_OVERFLOW (x_5(D), y_6(D));
  _1 = REALPART_EXPR <_11>;
  _10 = IMAGPART_EXPR <_11>;
  _2 = _10 != 0;
  _3 = (long unsigned int) _2;
  _4 = -_3;
  _7 = _1 | _4;
  return _7;
;;succ:   EXIT

}

After this patch:
uint64_t sat_add_uint64_t (uint64_t x, uint64_t y)
{
  uint64_t _7;

;;   basic block 2, loop depth 0
;;pred:   ENTRY
  _7 = .SAT_ADD (x_5(D), y_6(D)); [tail call]
  return _7;
;;succ:   EXIT
}

The below tests are passed for this patch:
1. The riscv fully regression tests.
3. The x86 bootstrap tests.
4. The x86 fully regression tests.

PR target/51492
PR target/112600

gcc/ChangeLog:

* internal-fn.cc (commutative_binary_fn_p): Add type IFN_SAT_ADD
to the return true switch case(s).
* internal-fn.def (SAT_ADD):  Add new signed optab SAT_ADD.
* match.pd: Add unsigned SAT_ADD match(es).
* optabs.def (OPTAB_NL): Remove fixed-point limitation for
us/ssadd.
* tree-ssa-math-opts.cc (gimple_unsigned_integer_sat_add): New
extern func decl generated in match.pd match.
(match_saturation_arith): New func impl to match the saturation 
arith.
(math_opts_dom_walker::after_dom_children): Try match saturation
arith when IOR expr.

Signed-off-by: Pan Li 
(cherry picked from commit 52b0536710ff3f3ace72ab00ce9ef6c630cd1183)

Diff:
---
 gcc/internal-fn.cc|  1 +
 gcc/internal-fn.def   |  2 ++
 gcc/match.pd  | 51 +++
 gcc/optabs.def|  4 ++--
 gcc/tree-ssa-math-opts.cc | 32 +
 5 files changed, 88 insertions(+), 2 deletions(-)

diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc
index 0a7053c2286c..73045ca8c8c1 100644
--- a/gcc/internal-fn.cc
+++ b/gcc/internal-fn.cc
@@ -4202,6 +4202,7 @@ commutative_binary_fn_p (internal_fn fn)
 case IFN_UBSAN_CHECK_MUL:
 case IFN_ADD_OVERFLOW:
 case IFN_MUL_OVERFLOW:
+case IFN_SAT_ADD:
 case IFN_VEC_WIDEN_PLUS:
 case IFN_VEC_WIDEN_PLUS_LO:
 case IFN_VEC_WIDEN_PLUS_HI:
diff --git a/gcc/internal-fn.def b/gcc/internal-fn.def
index 848bb9dbff3f..25badbb86e56 100644
--- a/gcc/internal-fn.def
+++ b/gcc/internal-fn.def
@@ -275,6 +275,8 @@ DEF_INTERNAL_SIGNED_OPTAB_FN (MULHS, ECF_CONST | 
ECF_NOTHROW, first,
 DEF_INTERNAL_SIGNED_OPTAB_FN (MULHRS, ECF_CONST | ECF_NOTHROW, first,
  smulhrs, umulhrs, binary)
 
+DEF_INTERNAL_SIGNED_OPTAB_FN (SAT_ADD, ECF_CONST, first, ssadd, usadd, binary)
+
 DEF_INTERNAL_COND_FN (ADD, ECF_CONST, add, binary)
 DEF_INTERNAL_COND_FN (SUB, ECF_CONST, sub, binary)
 DEF_INTERNAL_COND_FN (MUL, ECF_CONST, smul, binary)
diff --git a/gcc/match.pd b/gcc/match.pd
index d401e7503e62..aa1e2875c604 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -3043,6 +3043,57 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
|| POINTER_TYPE_P (itype))
   && wi::eq_p (wi::to_wide (int_cst), wi::max_value (itype))
 
+/* Unsigned Saturation Add */
+(match (usadd_left_part_1 @0 @1)
+ (plus:c @0 @1)
+ (if (INTEGRAL_TYPE_P (type)
+  && TYPE_UNSIGNED (TREE_TYPE (@0))
+  && types_match (type, TREE_TYPE (@0))
+  && types_match (type, TREE_TYPE (@1)
+
+(match (usadd_left_part_2 @0 @1)
+ (realpart (IFN_ADD_OVERFLOW:c @0 @1))
+ (if (INTEGRAL_TYPE_P (type)
+  && TYPE_UNSIGNED (TREE_TYPE (@0))
+  && types_match (type, TREE_TYPE (@0))
+  && types_match (type, TREE_TYPE (@1)
+
+(match (usadd_right_part_1 @0 @1)
+ (negate (convert (lt (plus:c @0 @1) @0)))
+ (if (INTEGRAL_TYPE_P 

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] Vect: Support new IFN SAT_ADD for unsigned vector int

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:674362d73e964815cdb700edd9fedbfc34c24c21

commit 674362d73e964815cdb700edd9fedbfc34c24c21
Author: Pan Li 
Date:   Wed May 15 10:14:06 2024 +0800

Vect: Support new IFN SAT_ADD for unsigned vector int

For vectorize, we leverage the existing vect pattern recog to find
the pattern similar to scalar and let the vectorizer to perform
the rest part for standard name usadd3 in vector mode.
The riscv vector backend have insn "Vector Single-Width Saturating
Add and Subtract" which can be leveraged when expand the usadd3
in vector mode.  For example:

void vec_sat_add_u64 (uint64_t *out, uint64_t *x, uint64_t *y, unsigned n)
{
  unsigned i;

  for (i = 0; i < n; i++)
out[i] = (x[i] + y[i]) | (- (uint64_t)((uint64_t)(x[i] + y[i]) < x[i]));
}

Before this patch:
void vec_sat_add_u64 (uint64_t *out, uint64_t *x, uint64_t *y, unsigned n)
{
  ...
  _80 = .SELECT_VL (ivtmp_78, POLY_INT_CST [2, 2]);
  ivtmp_58 = _80 * 8;
  vect__4.7_61 = .MASK_LEN_LOAD (vectp_x.5_59, 64B, { -1, ... }, _80, 0);
  vect__6.10_65 = .MASK_LEN_LOAD (vectp_y.8_63, 64B, { -1, ... }, _80, 0);
  vect__7.11_66 = vect__4.7_61 + vect__6.10_65;
  mask__8.12_67 = vect__4.7_61 > vect__7.11_66;
  vect__12.15_72 = .VCOND_MASK (mask__8.12_67, { 18446744073709551615,
... }, vect__7.11_66);
  .MASK_LEN_STORE (vectp_out.16_74, 64B, { -1, ... }, _80, 0, 
vect__12.15_72);
  vectp_x.5_60 = vectp_x.5_59 + ivtmp_58;
  vectp_y.8_64 = vectp_y.8_63 + ivtmp_58;
  vectp_out.16_75 = vectp_out.16_74 + ivtmp_58;
  ivtmp_79 = ivtmp_78 - _80;
  ...
}

After this patch:
void vec_sat_add_u64 (uint64_t *out, uint64_t *x, uint64_t *y, unsigned n)
{
  ...
  _62 = .SELECT_VL (ivtmp_60, POLY_INT_CST [2, 2]);
  ivtmp_46 = _62 * 8;
  vect__4.7_49 = .MASK_LEN_LOAD (vectp_x.5_47, 64B, { -1, ... }, _62, 0);
  vect__6.10_53 = .MASK_LEN_LOAD (vectp_y.8_51, 64B, { -1, ... }, _62, 0);
  vect__12.11_54 = .SAT_ADD (vect__4.7_49, vect__6.10_53);
  .MASK_LEN_STORE (vectp_out.12_56, 64B, { -1, ... }, _62, 0, 
vect__12.11_54);
  ...
}

The below test suites are passed for this patch.
* The riscv fully regression tests.
* The x86 bootstrap tests.
* The x86 fully regression tests.

PR target/51492
PR target/112600

gcc/ChangeLog:

* tree-vect-patterns.cc (gimple_unsigned_integer_sat_add): New
func decl generated by match.pd match.
(vect_recog_sat_add_pattern): New func impl to recog the pattern
for unsigned SAT_ADD.

Signed-off-by: Pan Li 
(cherry picked from commit d4dee347b3fe1982bab26485ff31cd039c9df010)

Diff:
---
 gcc/tree-vect-patterns.cc | 52 +++
 1 file changed, 52 insertions(+)

diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
index 87c2acff386d..6fd2373644f4 100644
--- a/gcc/tree-vect-patterns.cc
+++ b/gcc/tree-vect-patterns.cc
@@ -4487,6 +4487,57 @@ vect_recog_mult_pattern (vec_info *vinfo,
   return pattern_stmt;
 }
 
+extern bool gimple_unsigned_integer_sat_add (tree, tree*, tree (*)(tree));
+
+/*
+ * Try to detect saturation add pattern (SAT_ADD), aka below gimple:
+ *   _7 = _4 + _6;
+ *   _8 = _4 > _7;
+ *   _9 = (long unsigned int) _8;
+ *   _10 = -_9;
+ *   _12 = _7 | _10;
+ *
+ * And then simplied to
+ *   _12 = .SAT_ADD (_4, _6);
+ */
+
+static gimple *
+vect_recog_sat_add_pattern (vec_info *vinfo, stmt_vec_info stmt_vinfo,
+   tree *type_out)
+{
+  gimple *last_stmt = STMT_VINFO_STMT (stmt_vinfo);
+
+  if (!is_gimple_assign (last_stmt))
+return NULL;
+
+  tree res_ops[2];
+  tree lhs = gimple_assign_lhs (last_stmt);
+
+  if (gimple_unsigned_integer_sat_add (lhs, res_ops, NULL))
+{
+  tree itype = TREE_TYPE (res_ops[0]);
+  tree vtype = get_vectype_for_scalar_type (vinfo, itype);
+
+  if (vtype != NULL_TREE
+   && direct_internal_fn_supported_p (IFN_SAT_ADD, vtype,
+  OPTIMIZE_FOR_BOTH))
+   {
+ *type_out = vtype;
+ gcall *call = gimple_build_call_internal (IFN_SAT_ADD, 2, res_ops[0],
+   res_ops[1]);
+
+ gimple_call_set_lhs (call, vect_recog_temp_ssa_var (itype, NULL));
+ gimple_call_set_nothrow (call, /* nothrow_p */ false);
+ gimple_set_location (call, gimple_location (last_stmt));
+
+ vect_pattern_detected ("vect_recog_sat_add_pattern", last_stmt);
+ return call;
+   }
+}
+
+  return NULL;
+}
+
 /* Detect a signed division by a constant that wouldn't be
otherwise vectorized:
 
@@ -6987,6 +7038,7 @@ static vect_recog_func vect_vect_recog_func_ptrs[] = {
   { vect_recog_vector_vector_shift_pattern, "vector_vector_shift" },
   { vect_recog_divmod_pattern, "divmod" },
   { 

[gcc(refs/vendors/riscv/heads/gcc-14-with-riscv-opts)] RISC-V: testsuite: Drop march-string in cmpmemsi/cpymemsi tests

2024-05-18 Thread Jeff Law via Gcc-cvs
https://gcc.gnu.org/g:faf2f9ed73969d838026027566473bde14db748b

commit faf2f9ed73969d838026027566473bde14db748b
Author: Christoph Müllner 
Date:   Thu May 16 09:53:47 2024 +0200

RISC-V: testsuite: Drop march-string in cmpmemsi/cpymemsi tests

The tests cmpmemsi-1.c and cpymemsi-1.c are execution ("dg-do run")
tests, which does not have any restrictions for the enabled extensions.
Further, no other listed options are required.
Let's drop the options, so that the test can also be executed on
non-f and non-d targets.  However, we need to set options to the
defaults without '-ansi', because the included test file uses the
'asm' keyword, which is not part of ANSI C.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/cmpmemsi-1.c: Drop options.
* gcc.target/riscv/cpymemsi-1.c: Likewise.

Signed-off-by: Christoph Müllner 
(cherry picked from commit b8b82bb05c10544da05cd0d3d39e6bc3763a8d9f)

Diff:
---
 gcc/testsuite/gcc.target/riscv/cmpmemsi-1.c | 3 +--
 gcc/testsuite/gcc.target/riscv/cpymemsi-1.c | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/gcc/testsuite/gcc.target/riscv/cmpmemsi-1.c 
b/gcc/testsuite/gcc.target/riscv/cmpmemsi-1.c
index d7e0bc474073..698f27d89fbf 100644
--- a/gcc/testsuite/gcc.target/riscv/cmpmemsi-1.c
+++ b/gcc/testsuite/gcc.target/riscv/cmpmemsi-1.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-march=rv32gc_zbb -save-temps -g0 -fno-lto" { target { rv32 } 
} } */
-/* { dg-options "-march=rv64gc_zbb -save-temps -g0 -fno-lto" { target { rv64 } 
} } */
+/* { dg-options "-pedantic-errors" } */
 /* { dg-timeout-factor 2 } */
 
 #include "../../gcc.dg/memcmp-1.c"
diff --git a/gcc/testsuite/gcc.target/riscv/cpymemsi-1.c 
b/gcc/testsuite/gcc.target/riscv/cpymemsi-1.c
index 983b564ccaf7..30e9f119bedc 100644
--- a/gcc/testsuite/gcc.target/riscv/cpymemsi-1.c
+++ b/gcc/testsuite/gcc.target/riscv/cpymemsi-1.c
@@ -1,7 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "-march=rv32gc -save-temps -g0 -fno-lto" { target { rv32 } } } 
*/
-/* { dg-options "-march=rv64gc -save-temps -g0 -fno-lto" { target { rv64 } } } 
*/
-/* { dg-additional-options "-DRUN_FRACTION=11" { target simulator } } */
+/* { dg-options "-pedantic-errors" } */
 /* { dg-timeout-factor 2 } */
 
 #include "../../gcc.dg/memcmp-1.c"


  1   2   >