On Wed, Jun 18, 2025 at 4:12 PM Cui, Lili <lili....@intel.com> wrote: > > > > > -----Original Message----- > > From: Uros Bizjak <ubiz...@gmail.com> > > Sent: Wednesday, June 18, 2025 9:22 PM > > To: Cui, Lili <lili....@intel.com> > > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao <hongtao....@intel.com>; > > hongjiu...@intel.com > > Subject: Re: [PATCH] x86: Fix shrink wrap separate ICE under -fstack-clash- > > protection [PR120697] > > > > On Wed, Jun 18, 2025 at 3:11 PM Cui, Lili <lili....@intel.com> wrote: > > > > > > From: Lili Cui <lili....@intel.com> > > > > > > Hi Uros, > > > > > > An assertion I added in shrink wrap separate V2 reports ICE when -fstack- > > clash-protection is enabled. The assertion should not be added here. > > > > > > I created a patch to remove 3 assertions and their associated code. > > > > > > 1. Reproduced PR120697 issue and solved the issue with this patch, also > > added a new test case for -fstack-clash-protection. > > > 2. Recollected performance data with -fstack-clash-protection, there is no > > ICE and regressions. > > > 3. Use this patch to build the latest Linux kernel and boot successfully. > > > 4. Bootstrapped & regtested on x86-64-pc-linux-gnu. > > > > > > Ok for master? > > > > > > Thanks, > > > Lili. > > > > > > > > > gcc/ChangeLog: > > > > > > PR target/120697 > > > * config/i386/i386.cc (ix86_expand_prologue): > > > Remove 3 assertions and associated code. > > > > > > gcc/testsuite/ChangeLog: > > > > > > PR target/120697 > > > * gcc.target/i386/stack-clash-protection.c: New test. > > > > LGTM, but only in the sense that you are reverting parts of the original > > patch. > > > > Sure, this fix simply removes some code in shrink-wrapped separate patch. > Once Sam has verified the patch in his environment, I will commit the patch.
There is a small inconsistency in your patch that escaped my review: you should set the type of the new instruction, something like: - [(set (attr "length_immediate") + [(set (attr "type") + (cond [(match_operand:<MODE> 2 "const0_operand") + (const_string "imov") + ] + (const_string "lea"))) + (set (attr "length_immediate") Uros.