← Back to Pull requests

Include x86gprintrin.h instead of bmi2intrin.h #2071

Closed
musicinmybrain closed this pull request without merging on Jun 09, 2026 15:50 UTC
View on GitHub
musicinmybrain musicinmybrain commented on Jun 07, 2026 06:13 UTC
Author

GCC 16 produces an error when including bmi2intrin.h directly:

Never use <bmi2intrin.h> directly; include <x86gprintrin.h> instead.

See https://github.com/gcc-mirror/gcc/blob/cd33e5ad1945f19b5b1b2429ee62d1b3c8919914/gcc/config/i386/bmi2intrin.h#L24-L26.

This PR fixes failure to build with GCC 16 when the BMI2 extensions are enabled, e.g., when targeting x86_64-v3, by following the compiler’s advice.

Diff: 2 lines (+1 / -1) across 1 files Reviewer: derekmauro Review duration: 3456m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.10) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.10 · 2 lines diff across 1 files
0.10
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.71 · 4 substantive comment(s)
0.71
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
83%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.066
Real PR Conversation Timeline
5 items
derekmauro derekmauro commented on code on Jun 09, 2026 14:41 UTC
Code Review
absl/container/internal/raw_hash_set.h:1
@@ -231,7 +231,7 @@
 #endif
 
 #ifdef __BMI2__
-#include <bmi2intrin.h>
+#include <x86gprintrin.h>

This doesn't seem to work for clang. The clang version doesn't transitively include bmi2intrin.h. It looks like <immintrin.h> works on all compilers. I'll fix that for you.

musicinmybrain musicinmybrain commented on code on Jun 09, 2026 19:29 UTC
Code Review
absl/container/internal/raw_hash_set.h:1
@@ -231,7 +231,7 @@
 #endif
 
 #ifdef __BMI2__
-#include <bmi2intrin.h>
+#include <x86gprintrin.h>

That seems reasonable. Thanks for the review and revision.

Mizux Mizux commented on Jul 02, 2026 14:14 UTC
Contributor

spotted also with gcc 14 on almalinux and rockylinux in our docker based ci of google/or-tools...
see: https://github.com/google/or-tools/actions/runs/28590300063/job/84771871935

@derekmauro would be cool if you can add it to the release's "Known Issues"
https://github.com/abseil/abseil-cpp/releases/tag/20260526.0 (or enable discussion on release so we can comment it...)

derekmauro derekmauro commented on Jul 02, 2026 16:48 UTC
Contributor

Added it to the known issues. We may do a patch release to include this fix.

Reviewers
Assignees
musicinmybrain musicinmybrain
Labels
risk: low confidence: 83.6% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 9.6% (LOW) · Higher = larger blast radius
9.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 83.6% · Lower = rushed or shallow review
83.6%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 2% · Safe to merge
2%