[PATCH] D81353: [PowerPC] Don't convert Loop to CTR Loop for fp128 BinaryOperator
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 7 20:16:18 PDT 2020
steven.zhang added a comment.
In D81353#2078725 <https://reviews.llvm.org/D81353#2078725>, @efriedma wrote:
> Not a comment on this patch specifically, but in general, I'd recommend changing the PowerPC implementation of hardware loops to switch to an approach that allows making the final decision on whether to emit a hardware loop after isel. ARM does this.
>
> Basically, if that target sets HWLoopInfo.CounterInReg to true in isHardwareLoopProfitable, the HardwareLoops pass emits slightly different intrinsics; the alternate intrinsics are more straightforward to lower to a regular compare/branch. Then, if the target decides after isel that a hardware loop is illegal or unprofitable, it can easily fall back. That way, we can avoid this endless stream of bugs: if isHardwareLoopProfitable misses some obscure construct that requires clobbering CTR, it doesn't matter.
Cannot agree with this suggestion any more. We are struggling to sync the logic with isel that is hard to maintain.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81353/new/
https://reviews.llvm.org/D81353
More information about the llvm-commits
mailing list