Missed optimization: unnecessary comparison with __builtin_add_overflow and duplicate addition on AArch64
Open
backend:AArch64
llvm:optimizations
missed-optimization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
When the sum of the first two arguments of __builtin_add_overflow is used instead of its result, Clang emits the same instructions for x64 but an additional comparison on AArch64: https://godbolt.org/z/E1bh1WGM9
Contributor guide
Assessment
This issue has not been assessed yet.