Page MenuHomePhabricator

[PowerPC] Allow constrained FP intrinsics in mightUseCTR
Needs ReviewPublic

Authored by qiucf on Jun 16 2020, 4:02 AM.

Details

Reviewers
ZhangKang
steven.zhang
nemanjai
jsji
hfinkel
Group Reviewers
Restricted Project
Summary

We may meet Invalid CTR loop crash when there's constrained ops inside. This patch adds constrained FP intrinsics to the list so that CTR loop verification doesn't complain about it.

Diff Detail

Event Timeline

qiucf created this revision.Jun 16 2020, 4:02 AM
steven.zhang added inline comments.Jun 16 2020, 7:22 PM
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
389

So, how about the constrained fcmp/fcmps ?

qiucf updated this revision to Diff 272332.Jun 21 2020, 10:05 PM
qiucf marked an inline comment as done.

Add logic for constrained binops/conversion.

qiucf added inline comments.Jun 21 2020, 10:06 PM
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
389

It seems normal fcmp is also not handled here (when hard float is on).

qiucf updated this revision to Diff 282495.Sun, Aug 2, 8:38 PM

Handle constrained 'fcmp' and 'fcmps'

steven.zhang accepted this revision.Sun, Aug 2, 8:44 PM

LGTM. Thank you for doing this.

This revision is now accepted and ready to land.Sun, Aug 2, 8:44 PM
steven.zhang requested changes to this revision.Sun, Aug 2, 8:47 PM

I realize that, the test is missing. Please provide a test for a loop that has the constrain fp operations and verify if the hw loop is generated.

This revision now requires changes to proceed.Sun, Aug 2, 8:47 PM
qiucf updated this revision to Diff 282507.Sun, Aug 2, 11:41 PM

Add missing test back. Thanks for review

Add missing test back. Thanks for review

Can you add checker for the bdnz ?