Apply tentative llvm fix for avoiding fma on PowerPC SPE
Merge llvm review D77558, by Justin Hibbits: PowerPC: Don't hoist float multiply + add to fused operation on SPE SPE doesn't have a fmadd instruction, so don't bother hoisting a multiply and add sequence to this, as it'd become just a library call. Hoisting happens too late for the CTR usability test to veto using the CTR in a loop, and results in an assert "Invalid PPC CTR loop!". Reported by: alfredo Obtained from: https://reviews.llvm.org/D77558 MFC after: 3 days
This commit is contained in:
parent
eec3290266
commit
9ef1127008
@ -16623,6 +16623,8 @@ bool PPCTargetLowering::isFMAFasterThanFMulAndFAdd(const MachineFunction &MF,
|
|||||||
|
|
||||||
bool PPCTargetLowering::isFMAFasterThanFMulAndFAdd(const Function &F,
|
bool PPCTargetLowering::isFMAFasterThanFMulAndFAdd(const Function &F,
|
||||||
Type *Ty) const {
|
Type *Ty) const {
|
||||||
|
if (Subtarget.hasSPE())
|
||||||
|
return false;
|
||||||
switch (Ty->getScalarType()->getTypeID()) {
|
switch (Ty->getScalarType()->getTypeID()) {
|
||||||
case Type::FloatTyID:
|
case Type::FloatTyID:
|
||||||
case Type::DoubleTyID:
|
case Type::DoubleTyID:
|
||||||
|
Loading…
Reference in New Issue
Block a user