← Saturday, October 10, 2026Performance & OSDeep dive
128-bit addition on RV32 can introduce a conditional branch
The compiler splits 128-bit addition into 32-bit operations and propagates carry between them, producing a branch in the shown code. The example shows how source-level arithmetic can map unexpectedly onto low-level control flow.
- What
- - A compiler can introduce conditional branches when generating code for operations intended to be branch-free.
- How
- - On RV32, 128-bit addition is split into smaller additions with carry propagation; even a bit-mask selection compiled to a branch in the examples.
- Why it matters
- - Engineers writing constant-time code must inspect generated assembly and repeat the review when compiler versions or flags change.
Discussion
Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.
Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.