Skip to content

gcc prompts: verify the premise of incomplete-fix findings - #984

Merged
rgushchin merged 1 commit into
sashiko-dev:mainfrom
sendaoYan:gcc-prompts-verify-incomplete-fix
Dec 3, 2026
Merged

rgushchin merged 1 commit into
sashiko-dev:mainfrom
sendaoYan:gcc-prompts-verify-incomplete-fix

Conversation

@sendaoYan

Copy link
Copy Markdown
Contributor

The GCC profile repeatedly reports that a fix is narrower than the IPA
function summary and leaves the original failure reachable, without checking
that the analysis actually acts on the claimed shape. On PR129112 this
produced one false positive per round for loop-header defaults and
-fstrict-enums enumerations, although the unpatched compiler does not fail
for them.

Add a false-positive-guide rule and extend the mirror-the-analysis rule in
review-core.md to require the premise first: name the other analysis's exact
condition and show it holds for the claimed shape (for IPA, the predicate is
proven false and the call edge is redirected so the callee is removed while
the failing IR survives). If the premise cannot be established, it is not a
finding — a partial fix is a finding only when the original failure is
demonstrably still reachable.

Prompt-only change; the prompt bundle hash changes. Closes #979.

@sendaoYan
sendaoYan force-pushed the gcc-prompts-verify-incomplete-fix branch from 0c6e552 to c9af7b5 Compare December 3, 2026 12:10
@sashiko-bot

sashiko-bot Bot commented Dec 3, 2026

Copy link
Copy Markdown

Sashiko review — v2

Commit 1/1 — c9af7b52 gcc prompts: verify the premise of incomplete-fix findings

  • [MEDIUM] projects/gcc/prompts/false-positive-guide.md and
    projects/gcc/prompts/review-core.md: the new IPA function-summary rule
    requires showing that the predicate is proven false, the call edge is
    redirected, and the callee is removed for every IPA incomplete-fix claim,
    and directs reviewers to drop the finding otherwise. IPA function summaries
    in ipa-fnsummary.cc also drive inlining, IPA-CP, cloning, and ICF, where an
    incomplete predicate can leave an ICE or wrong-code bug reachable without
    redirecting a call edge or removing a callee. Following the literal wording
    causes GCC reviews to skip or dismiss valid incomplete-fix findings for
    those consumers. Frame the dead-callee-removal sequence as an example and
    require showing the IPA condition that keeps the reported failure reachable,
    as the rule already does for VRP and jump threading.

Full review and stage logs on sashiko.sashiko.dev

The GCC profile repeatedly reports that a fix is narrower than the IPA
function summary without checking that the analysis actually proves the
claimed shape dead. On PR129112 that produced one false positive per round
for loop-header defaults and -fstrict-enums enumerations, although the
unpatched compiler does not fail for them.

Add a false-positive-guide rule and extend the mirror-the-analysis rule in
review-core.md: report an incomplete-fix claim only when the other analysis
actually proves the shape dead, otherwise there is no failure for the patch
to leave reachable.

Closes: sashiko-dev#979
Signed-off-by: Sendao Yan <yansendao@126.com>
@sendaoYan
sendaoYan force-pushed the gcc-prompts-verify-incomplete-fix branch from c9af7b5 to a65e583 Compare December 3, 2026 12:22
@sashiko-bot

sashiko-bot Bot commented Dec 3, 2026

Copy link
Copy Markdown

Sashiko review — v3

✓ No issues found across 1 commit.

Full review log on sashiko.sashiko.dev

@rgushchin
rgushchin merged commit 6b7813f into sashiko-dev:main Dec 3, 2026
1 check passed
@sendaoYan

Copy link
Copy Markdown
Contributor Author

@rgushchin Thanks for the review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gcc prompts: require verifying the premise of "incomplete fix" findings

2 participants