[PATCH] D77558: PowerPC: Don't hoist float multiply + add to fused operation on SPE
Justin Hibbits via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 07:34:44 PDT 2020
jhibbits added a comment.
In D77558#1966207 <https://reviews.llvm.org/D77558#1966207>, @shchenz wrote:
> > This 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!".
>
> This means after not hoisting `fmul` makes a case have "Invalid PPC CTR loop!" assertion? This is a little surprised for me. Hoist or not hoist `fmul` should not impact CTR register.
> Looking forward to your case.
Sorry, on a further reading of the summary I can see it can be a little confusing. *hoisting* fmul + fadd to fma results in a library call, because SPE doesn't have a fma instruction. Unfortunately, this transform is performed long after a loop is transformed to a CTR with bdnz loop, so it can't be caught at the loop transform time, and block the loop. In addition to triggering that assert, hoisting two instructions into a function call is quite a pessimization anyway :)
I'll update the summary to clarify this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77558/new/
https://reviews.llvm.org/D77558
More information about the llvm-commits
mailing list