Re: [PATCH] c, v2: Add __builtin_stdc_rotate_{left, right} builtins [PR117030]

2024-10-25 Thread Joseph Myers
On Thu, 24 Oct 2024, Jakub Jelinek wrote: > + if (TYPE_UNSIGNED (TREE_TYPE (arg2)) > + || sanitize_flags_p (SANITIZE_SHIFT)) > + arg2 = build2_loc (loc, TRUNC_MOD_EXPR, TREE_TYPE (arg2), > + arg2, build_int_cst (TREE_TYPE (

Re: [PATCH] c, v2: Add __builtin_stdc_rotate_{left, right} builtins [PR117030]

2024-10-25 Thread Jakub Jelinek
On Thu, Oct 24, 2024 at 07:38:49PM +0200, Jakub Jelinek wrote: > The only changed parts are extend.texi, c-parser.cc and the 2 testcases. Bootstrapped/regtested successfully on both x86_64-linux and i686-linux. > 2024-10-24 Jakub Jelinek > > PR c/117030 > gcc/ > * doc/extend.texi

[PATCH] c, v2: Add __builtin_stdc_rotate_{left, right} builtins [PR117030]

2024-10-25 Thread Jakub Jelinek
On Thu, Oct 24, 2024 at 02:20:16PM +, Joseph Myers wrote: > On Thu, 24 Oct 2024, Jakub Jelinek wrote: > > > +@defbuiltin{@var{type} __builtin_stdc_rotate_left (@var{type} @var{arg1}, > > @var{type} @var{arg2})} > > The rotate count doesn't need to be the same type as the value rotated, so >