PowerPC: Treat llvm.fma.f* intrinsic as using CTR with SPE
Summary: The SPE doesn't have a 'fma' instruction, so the intrinsic becomes a libcall. It really should become an expansion to two instructions, but for some reason the compiler doesn't think that's as optimal as a branch. Since this lowering is done after CTR is allocated for loops, tell the optimizer that CTR may be used in this case. This prevents a "Invalid PPC CTR loop!" assertion in the case that a fma() function call is used in a C/C++ file, and clang converts it into an intrinsic. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D78668
Loading
Please register or sign in to comment