llvm / llvm/llvm-project

[Compiler-rt] Tracking Issue: Use LLVM Libc math routines in builtins

Open
#197,824 1 comment 0 reactions 1 assignee Claimed by @hulxv View on GitHub
libc
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

This issue tracks the progress of the using of libc math routines in compiler-rt builtins.

RFC: https://discourse.llvm.org/t/rfc-explore-using-llvm-libc-math-routines-for-compiler-rt-floating-point-builtins/89670

- **Quad-Precision (128-bit / `tf`) Arithmetic**
- [x] `__addtf3` #197950
- [x] `__subtf3` #207092
- [x] `__multf3` #207092
- [x] `__divtf3` #207092

- **Quad-Precision Comparisons**
- [ ] `__letf2` #212653
- [ ] `__getf2` #212653
- [ ] `__unordtf2` #212653
- [ ] `__eqtf2` #212653
- [ ] `__netf2` #212653
- [ ] `__lttf2` #212653
- [ ] `__gttf2` #212653

- **Double-Precision Comparisons**
- [ ] `__ledf2` #212652
- [ ] `__gedf2` #212652
- [ ] `__unorddf2` #212652
- [ ] `__eqdf2` #212652
- [ ] `__nedf2` #212652
- [ ] `__ltdf2` #212652
- [ ] `__gtdf2` #212652

- **Single-Precision Comparisons**
- [ ] `__lesf2` #212651
- [ ] `__gesf2` #212651
- [ ] `__unordsf2` #212651
- [ ] `__eqsf2` #212651
- [ ] `__nesf2` #212651
- [ ] `__ltsf2` #212651
- [ ] `__gtsf2` #212651

- **Int -> Quad-Precision Conversions**
- [ ] `__floatsitf` #215725
- [ ] `__floatditf` #215725
- [ ] `__floattitf` #215725
- [ ] `__floatunsitf` #215725
- [ ] `__floatunditf` #215725
- [ ] `__floatuntitf` #215725

- **Quad-Precision -> Int Conversions**
- [ ] `__fixtfsi` #215726
- [ ] `__fixtfdi` #215726
- [ ] `__fixtfti` #215726
- [ ] `__fixunstfsi` #215726
- [ ] `__fixunstfdi` #215726
- [ ] `__fixunstfti` #215726

- **Float <-> Float Extend/Truncate Conversions**
- [x] `__extendsftf2` #209984
- [x] `__extenddftf2` #209984
- [x] `__extendxftf2` #209984
- [x] `__trunctfdf2` #209984
- [x] `__trunctfsf2` #209984
- [x] `__trunctfxf2` #209984

- **Half-Precision (`_Float16`) Conversions**
- [ ] `__extendhfsf2` #211882
- [ ] `__extendhfdf2` #211882
- [ ] `__extendhftf2` #211882
- [ ] `__truncsfhf2` #211882
- [ ] `__truncdfhf2` #211882
- [ ] `__trunctfhf2` #211882

- **BFloat16 Conversions**
- [ ] `__truncsfbf2` #211881
- [ ] `__truncdfbf2` #211881
- [ ] `__trunctfbf2` #211881
- [ ] `__extendbfsf2` #211881

- **Double-Precision Arithmetic (Soft-Float Targets)**
- [x] `__adddf3` #207092
- [x] `__subdf3` #207092
- [x] `__muldf3` #207092
- [x] `__divdf3` #207092
- [x] `__negdf2` #207092

- **Single-Precision Arithmetic (Soft-Float Targets)**
- [x] `__addsf3` #207092
- [x] `__subsf3` #207092
- [x] `__mulsf3` #207092
- [x] `__divsf3` #207092
- [x] `__negsf2` #207092

- **x87 80-bit Extended Precision**
- [ ] `__floatdixf` #215729
- [ ] `__floattixf` #215729
- [ ] `__floatundixf` #215729
- [ ] `__floatuntixf` #215729
- [ ] `__fixunsxfsi` #215729
- [ ] `__fixunsxfdi` #215729
- [ ] `__fixunsxfti` #215729
- [ ] `__fixxfdi` #215729
- [ ] `__fixxfti` #215729
- [ ] `__extendhfxf2` #215729
- [ ] `__truncxfhf2` #215729
- [ ] `__truncxfbf2` #215729

- **Int -> Double / Int -> Single Conversions**
- [x] `__floatsidf` #209900
- [x] `__floatdidf` #209900
- [x] `__floattidf` #209900
- [x] `__floatsisf` #209900
- [x] `__floatdisf` #209900
- [x] `__floattisf` #209900
- [x] `__floatunsidf` #209900
- [x] `__floatundidf` #209900
- [x] `__floatuntidf` #209900
- [x] `__floatunsisf` #209900
- [x] `__floatundisf` #209900
- [x] `__floatuntisf` #209900

- **Double/Single -> Int Conversions**
- [x] `__fixdfsi` #207543
- [x] `__fixdfdi` #207543
- [x] `__fixdfti` #207543
- [x] `__fixsfsi` #207543
- [x] `__fixsfdi` #207543
- [x] `__fixsfti` #207543
- [x] `__fixunsdfsi` #207543
- [x] `__fixunsdfdi` #207543
- [x] `__fixunsdfti` #207543
- [x] `__fixunssfsi` #207543
- [x] `__fixunssfdi` #207543
- [x] `__fixunssfti` #207543

- **Double <-> Single Extend/Truncate**
- [x] `__extendsfdf2` #209984
- [x] `__truncdfsf2` #209984

CC: @michaelrj-google @bassiounix @lntue

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.