[PATCH] D125746: [PowerPC] Treat llvm.fmuladd intrinsic as using CTR
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 19:37:46 PDT 2022
shchenz added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp:505
+ return true;
+ else
+ LLVM_FALLTHROUGH;
----------------
qiucf wrote:
> shchenz wrote:
> > no need for `else`.
> > And why we need `LLVM_FALLTHROUGH`, I don't see any handling for `Intrinsic::fmuladd` in the switch block below, will `break` work?
> Here `FALLTHROUGH` sets `Opcode = ISD::FMA` for `fmuladd`. Code below checks whether `Opcode` is legal or custom, otherwise returns true.
Oh, yes, right. Then should `case Intrinsic::fma` have the same issue handled in `case Intrinsic::fmuladd` for double double? Or on the other hand, do we need the specific handling in `case Intrinsic::fmuladd`, will Opcode leagl or custom cover the check for type double double?
================
Comment at: llvm/test/CodeGen/PowerPC/pr55463.ll:10
+; CHECK-NEXT: stwu 1, -48(1)
+; CHECK-NEXT: .cfi_def_cfa_offset 48
+; CHECK-NEXT: .cfi_offset lr, 4
----------------
Can add a `nounwind` attribute for the function to simply the case a little bit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125746/new/
https://reviews.llvm.org/D125746
More information about the llvm-commits
mailing list