> From: Uros Bizjak <ubiz...@gmail.com>
> Sent: Tuesday, October 22, 2024 7:32 PM
> 
> On Tue, Oct 22, 2024 at 8:31 AM Haochen Jiang <haochen.ji...@intel.com>
> wrote:
> >
> > diff --git a/gcc/builtins.cc b/gcc/builtins.cc index
> > 37c7c98e5c7..52520d54b84 100644
> > --- a/gcc/builtins.cc
> > +++ b/gcc/builtins.cc
> > @@ -1296,8 +1296,8 @@ expand_builtin_prefetch (tree exp)
> >      }
> >    else
> >      op1 = expand_normal (arg1);
> > -  /* Argument 1 must be either zero or one.  */
> > -  if (INTVAL (op1) != 0 && INTVAL (op1) != 1)
> > +  /* Argument 1 must be 0, 1 or 2.  */  if (INTVAL (op1) < 0 ||
> > + INTVAL (op1) > 2)
> 
> You can use the IN_RANGE macro here:
> 
> if (!IN_RANGE (INTVAL (op1), 0, 2))
> 
> This will call INTVAL only once.

Ok I will do that change.

Thx,
Haochen

> 
> Uros.

Reply via email to