* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
@ 2023-10-13 12:02 ` rguenth at gcc dot gnu.org
2023-10-13 12:04 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-13 12:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's the promote_prototypes hook btw.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
2023-10-13 12:02 ` [Bug tree-optimization/111796] " rguenth at gcc dot gnu.org
@ 2023-10-13 12:04 ` rguenth at gcc dot gnu.org
2023-10-13 12:10 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-13 12:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
We could also decide to only apply promote_prototype at RTL expansion time?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
2023-10-13 12:02 ` [Bug tree-optimization/111796] " rguenth at gcc dot gnu.org
2023-10-13 12:04 ` rguenth at gcc dot gnu.org
@ 2023-10-13 12:10 ` rguenth at gcc dot gnu.org
2023-10-13 12:16 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-13 12:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> It's the promote_prototypes hook btw.
Of the major targets (x86, arm, aarch64, powerpc, s390, riscv) only x86
defines the hook to true. But there are a lot of embedded archs doing so,
and ia64 and the pa.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2023-10-13 12:10 ` rguenth at gcc dot gnu.org
@ 2023-10-13 12:16 ` rguenth at gcc dot gnu.org
2023-10-13 12:40 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-13 12:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> (In reply to Richard Biener from comment #1)
> > It's the promote_prototypes hook btw.
>
> Of the major targets (x86, arm, aarch64, powerpc, s390, riscv) only x86
> defines the hook to true. But there are a lot of embedded archs doing so,
> and ia64 and the pa.
Interestingly the Ada frontend has
tree
create_param_decl (tree name, tree type)
{
tree param_decl = build_decl (input_location, PARM_DECL, name, type);
/* Honor TARGET_PROMOTE_PROTOTYPES like the C compiler, as not doing so
can lead to various ABI violations. */
if (targetm.calls.promote_prototypes (NULL_TREE)
&& INTEGRAL_TYPE_P (type)
&& TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))
{
...
type = integer_type_node;
}
...
DECL_ARG_TYPE (param_decl) = type;
but the hook is nowhere called in other frontends besides C, C++ and Ada.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2023-10-13 12:16 ` rguenth at gcc dot gnu.org
@ 2023-10-13 12:40 ` rguenth at gcc dot gnu.org
2023-10-13 12:45 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-13 12:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
On aarch64 I see
t.c:5:1: warning: GCC does not currently support mixed size types for 'simd'
functions
5 | foo (int a, short b)
| ^~~
simdlen(8) is also not supported, but simdlen(4) isn't diagnosed. The above
still remains though.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2023-10-13 12:40 ` rguenth at gcc dot gnu.org
@ 2023-10-13 12:45 ` rguenth at gcc dot gnu.org
2023-11-22 5:21 ` pinskia at gcc dot gnu.org
2023-11-24 2:09 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-13 12:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCN handles this fine using simdlen(64).
<bb 3> [local count: 939524096]:
# ivtmp.31_10 = PHI <ivtmp.31_11(3), ivtmp.31_4(2)>
vectp_x.27_17 = (vector(64) int *) ivtmp.31_10;
vect__4.24_14 = MEM <vector(64) int> [(int *)vectp_x.27_17];
vect__5.25_15 = (vector(64) short int) vect__4.24_14;
vect__6.26_16 = foo.simdclone.0 (vect__4.24_14, vect__5.25_15);
MEM <vector(64) int> [(int *)vectp_x.27_17] = vect__6.26_16;
ivtmp.31_11 = ivtmp.31_10 + 256;
if (_8 != ivtmp.31_11)
goto <bb 3>; [85.71%]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
` (5 preceding siblings ...)
2023-10-13 12:45 ` rguenth at gcc dot gnu.org
@ 2023-11-22 5:21 ` pinskia at gcc dot gnu.org
2023-11-24 2:09 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-22 5:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-11-22
Ever confirmed|0 |1
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/111796] OMP SIMD call vectorization fails for arguments subject to integer promotion rules
2023-10-13 10:31 [Bug tree-optimization/111796] New: OMP SIMD call vectorization fails for arguments subject to integer promotion rules rguenth at gcc dot gnu.org
` (6 preceding siblings ...)
2023-11-22 5:21 ` pinskia at gcc dot gnu.org
@ 2023-11-24 2:09 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-24 2:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111796
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> On aarch64 I see
>
> t.c:5:1: warning: GCC does not currently support mixed size types for 'simd'
> functions
> 5 | foo (int a, short b)
> | ^~~
>
> simdlen(8) is also not supported, but simdlen(4) isn't diagnosed. The above
> still remains though.
That is due to PR 96341 .
^ permalink raw reply [flat|nested] 9+ messages in thread