[PATCH] D78668: PowerPC: Treat llvm.fma.f* intrinsic as using CTR with SPE
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 00:29:50 PDT 2020
shchenz added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp:320
+ if (ST->hasSPE())
+ return true; // ISD::FMA might be a libcall on SPE
+ else
----------------
In `PPCTargetLowering::PPCTargetLowering`, We already have
```
if (Subtarget.hasSPE()) {
setOperationAction(ISD::FMA , MVT::f64, Expand);
setOperationAction(ISD::FMA , MVT::f32, Expand);
}
```
And there is a hook function `TLI->isOperationLegalOrCustom(Opcode, EVTy)` at line 415. I think better to use that function to check if one operation with a type is legal or not, similar with following `Intrinsic::sqrt`?
================
Comment at: llvm/test/CodeGen/PowerPC/spe.ll:1405
; CHECK-NEXT: blr
-entry:
%b = getelementptr %struct.a, %struct.a* %f, i32 0, i32 0
----------------
Accidentally delete?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78668/new/
https://reviews.llvm.org/D78668
More information about the llvm-commits
mailing list