It is possible to generate the llvm.fmuladd.ppcf128 intrinsic, and there is no actual
FMA instruction that corresponds to this intrinsic call for ppcf128. Thus, this
intrinsic needs to remain as a call as it cannot be lowered to any instruction, which
also means we need to disable CTR loop generation for fma involving the ppcf128 type.
This patch accomplishes this behaviour.
Details
- Reviewers
nemanjai stefanp shchenz - Group Reviewers
Restricted Project - Commits
- rG581a80304c67: [PowerPC] Disable CTR Loop generate for fma with the PPC double double type.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp | ||
---|---|---|
462 | Enable/disable CTR loop generation can not make sure the Intrinsic::fmuladd be kept as a call. Can we move these lines to line 500? | |
llvm/test/CodeGen/PowerPC/disable-ctr-ppcf128.ll | ||
150 | Can we narrow down the case a little bit? maybe one call is enough? |
Address review comments:
- Move case the fmuladd lower in mightUseCTR.
- Shorten test case to one llvm.fmuladd.ppcf128 intrinsic call.
Look good to me except for some minor comments for the test cases part.
llvm/test/CodeGen/PowerPC/disable-ctr-ppcf128.ll | ||
---|---|---|
17 | Is it necessary to test we don't generate a CTR loop? | |
22 | none of these args are used in the function body, so I think they can be removed and the type definition for %0, %1, %2, %3 can also be removed? | |
22 | We can also removed the unnecessary function attributes like linkonce_odr hidden local_unnamed_addr and local_unnamed_addr? |
Clean up test case a little more - removing unnecessary function attributes/arguments.
@shchenz I've cleaned up the test case a little bit more by removing the attributes and arguments (that I realized we were not utilizing). Thanks for catching these details! :-)
Enable/disable CTR loop generation can not make sure the Intrinsic::fmuladd be kept as a call. Can we move these lines to line 500?