On Thu, Mar 27, 2025 at 11:24 PM Jakub Jelinek <ja...@redhat.com> wrote: > > On Thu, Mar 27, 2025 at 09:28:31PM +0100, Uros Bizjak wrote: > > plus_constant expects integer as its third argument, not rtx. > > > > gcc/ChangeLog: > > > > * config/i386/i386.cc (ix86_redzone_clobber): Use integer, not rtx > > as the third argument of plus_constant. > > Oops, thanks for catching this. > > And guess we should improve the poly-int.h ctors so that it rejects mistakes > like this, rather than doing something really weird. > > If I read it right, I think it was just casting the rtx (i.e. a pointer) > to HOST_WIDE_INT:
Yes, and the resulting RTX was: (insn:TI 6 3 12 2 (parallel [ (asm_operands/v ("#") ("") 0 [] [] [] clob.c:3) (clobber (mem:BLK (plus:DI (reg/f:DI 7 sp) (const_int 139695828545120 [0x7f0d783cae60])) [0 S128 A8])) (clobber (reg:CC 17 flags)) instead of: (insn:TI 6 3 12 2 (parallel [ (asm_operands/v ("#") ("") 0 [] [] [] clob.c:3) (clobber (mem:BLK (plus:DI (reg/f:DI 7 sp) (const_int -128 [0xffffffffffffff80])) [0 S128 A8])) (clobber (reg:CC 17 flags)) Uros.