llvm / llvm/llvm-project

Missed optimization with `sbb` (possible regression from clang 22)

Open
#201,436 2 comments 0 reactions 1 assignee Claimed by @iamaayushrivastava View on GitHub
llvm:optimizations missed-optimization
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

https://godbolt.org/z/sPzh5GPMP

There appears to be a regression in the output of `void sbb2(...)`.

`adc` seems to be used correctly, usages of `sbb` seem to be missed. Also, I believe `void sbb3(...)` should have similar codegen to that of `void adc3(...)` but it doesn't.

Also, in rust, `sbb reg, 0` and `dec reg` isn't simplified to `sbb reg, 1`
https://godbolt.org/z/z3hnzb77v

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.