diff options
author | Piyou Chen <piyou.chen@sifive.com> | 2023-04-24 19:58:38 -0700 |
---|---|---|
committer | Piyou Chen <piyou.chen@sifive.com> | 2023-04-24 20:15:14 -0700 |
commit | 8a3950510f819308f7ead16c339484147c69c84a (patch) | |
tree | a683325b28f49423956f0dca1dd719f76b027933 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | e66c2db7996ed0ce8cd27548a623ce62246be33b (diff) | |
download | llvm-8a3950510f819308f7ead16c339484147c69c84a.zip llvm-8a3950510f819308f7ead16c339484147c69c84a.tar.gz llvm-8a3950510f819308f7ead16c339484147c69c84a.tar.bz2 |
[RISCV] Support scalar/fix-length vector NTLH intrinsic with different domain
This commit implements the two NTLH intrinsic functions.
```
type __riscv_ntl_load (type *ptr, int domain);
void __riscv_ntl_store (type *ptr, type val, int domain);
```
```
enum {
__RISCV_NTLH_INNERMOST_PRIVATE = 2,
__RISCV_NTLH_ALL_PRIVATE,
__RISCV_NTLH_INNERMOST_SHARED,
__RISCV_NTLH_ALL
};
```
We encode the non-temporal domain into MachineMemOperand flags.
1. Create the RISC-V built-in function with custom semantic checking.
2. Assume the domain argument is a compile time constant,
and make it as LLVM IR metadata (nontemp_node).
3. Encode domain value as two bits MachineMemOperand TargetMMOflag.
4. According to MachineMemOperand TargetMMOflag, select corrsponding ntlh instruction.
Currently, it supports scalar type and fixed-length vector type.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D143364
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions