Fix egal codegen on large (>512 bytes), split representation isbitsegal types #62095
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #62095"
general
weight: 0.35
xal-0
Large (> 512 bytes) struct that are isbitsegal emit a memcmp instead of a comparison for each field. However, this requires that both the arguments to the memcmp be in the canonical struct layout, which is a problem for structs in the split layout because of the calling convention.
Here's an example:
N=40is chosen to make the resultingNTuple{N, Mixed}at least 512 bytes.To make the IR a little more readable, here's an example of the code we'd generate if the threshold for emitting
memcmpfor===was 64 bytes:The
memcmpinherits its alias info from the arguments, meaning it getsjtbaa_constas its TBAA, and thejnoalias_constalias scope, with every other scope in the noalias set. LLVM concludes the copies from the arguments to the combined versions on the stack aren't read and deletes them, leaving us with uninitialized stack memory where the non-pointers should be.Claude Fable 5 ran into this bug while I was having make a reproducer for a different bug.