Currently in Clang, we have various builtins for fnmsub operation:
- __builtin_vsx_xvnmsubasp/__builtin_vsx_xvnmsubadp for float/double vector, they'll be transformed into -fma(a, b, -c) in LLVM IR
- __builtin_ppc_fnmsubs/__builtin_ppc_fnmsub for float/double scalar, they'll generate corresponding intrinsic in IR
But for the vector version of builtin, the 3 op chain may be recognized as expensive by some passes (like early cse). We need some way to keep the fnmsub form until code generation.
This patch introduces ppc.fnmsub.* intrinsic to unify four fnmsub intrinsics.
If we improve the check lines to CHECK-COUNT, do we still need the original CHECKs?