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.
- Create the RISC-V built-in function with custom semantic checking.
- Assume the domain argument is a compile time constant,
and make it as LLVM IR metadata (nontemp_node).
- Encode domain value as two bits MachineMemOperand TargetMMOflag.
- According to MachineMemOperand TargetMMOflag, select corrsponding ntlh instruction.
Currently, it supports scalar type and fixed-length vector type.
Need to force ICEArguments for these intrinsics like we do for BI__builtin_rvv_vget_v and BI__builtin_rvv_vset_v otherwise we won't run the constant expression evaluator.