diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2025-02-07 09:25:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-07 09:25:13 +0000 |
commit | 4bf97aa818965d86055c762a42f6d518e8e3a21e (patch) | |
tree | 8e79e3eb4db6bb3a3954e3a2a7306d882454fc6b /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | ac158aa13b5a81552e45e63f534420c38e514484 (diff) | |
download | llvm-4bf97aa818965d86055c762a42f6d518e8e3a21e.zip llvm-4bf97aa818965d86055c762a42f6d518e8e3a21e.tar.gz llvm-4bf97aa818965d86055c762a42f6d518e8e3a21e.tar.bz2 |
[IR] Add `llvm.modf` intrinsic (#121948)
This adds the `llvm.modf` intrinsic, legalization, and lowering (mostly
reusing the lowering for sincos and frexp).
The `llvm.modf` intrinsic takes a floating-point value and returns both
the integral and fractional parts (as a struct).
```
declare { float, float } @llvm.modf.f32(float %Val)
declare { double, double } @llvm.modf.f64(double %Val)
declare { x86_fp80, x86_fp80 } @llvm.modf.f80(x86_fp80 %Val)
declare { fp128, fp128 } @llvm.modf.f128(fp128 %Val)
declare { ppc_fp128, ppc_fp128 } @llvm.modf.ppcf128(ppc_fp128 %Val)
declare { <4 x float>, <4 x float> } @llvm.modf.v4f32(<4 x float> %Val)
```
This corresponds to the libm `modf` function but returns multiple values
in a struct (rather than take output pointers), which makes it easier to
vectorize.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions