[PATCH] D81924: [PowerPC] Allow constrained FP intrinsics in mightUseCTR
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 03:20:24 PDT 2020
steven.zhang added a comment.
In D81924#2225652 <https://reviews.llvm.org/D81924#2225652>, @qiucf wrote:
> In D81924#2189996 <https://reviews.llvm.org/D81924#2189996>, @steven.zhang wrote:
>
>> Can you add checker for the bdnz ?
>
> We don't think any loop containing calls is profitable to transform:
I think the comments is out of date. This is the full context and we will check if we are using CTR for some calls as what you did now.
// We don't want to spill/restore the counter register, and so we don't
// want to use the counter register if the loop contains calls.
SmallPtrSet<const Value *, 4> Visited;
for (Loop::block_iterator I = L->block_begin(), IE = L->block_end();
I != IE; ++I)
if (mightUseCTR(*I, LibInfo, Visited))
return false;
> // We don't want to spill/restore the counter register, and so we don't
> // want to use the counter register if the loop contains calls.
>
> And it seems PPC won't set hardware loops info properly if it's not profitable. So when forcing it to use hardware loops, it would crash.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81924/new/
https://reviews.llvm.org/D81924
More information about the llvm-commits
mailing list