[clang] [HLSL] Implementation of the elementwise fmod builtin (PR #108849)

Zhengxing li via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 07:40:10 PDT 2024


lizhengxing wrote:

> This LGTM. There is one last thing we might want to do. But I'm not requiring it for sign off. We ussually add elementwise math builtins here:
> 
> * `clang/test/CodeGen/builtins-elementwise-math.c`
> * `clang/test/CodeGen/strictfp-elementwise-bulitins.cpp`
> * `clang/test/Sema/builtins-elementwise-math.c`
> * `clang/test/SemaCXX/builtins-elementwise-math.cpp`
> 
> Also I'd take a look at the existing fmod test cases and make sure there is nothing we need to update there:
> 
> ```shell
> clang/test/CodeGen/X86/math-builtins.c:11:  f = __builtin_fmod(f,f);    f = __builtin_fmodf(f,f);   f =  __builtin_fmodl(f,f);  f = __builtin_fmodf128(f,f);
> clang/test/CodeGen/builtins.c:318:  resd = __builtin_fmod(D,D);
> clang/test/CodeGen/constrained-math-builtins.c:11:  f = __builtin_fmod(f,f);    f = __builtin_fmodf(f,f);   f =  __builtin_fmodl(f,f); f = __builtin_fmodf128(f,f);
> clang/test/CodeGenOpenCL/builtins-f16.cl:55:  res = __builtin_fmodf16(h0, h1);
> ```

Done.

https://github.com/llvm/llvm-project/pull/108849


More information about the cfe-commits mailing list