This is an archive of the discontinued LLVM Phabricator instance.

[CSKY][NFC][test] Add more tests of CodeGen for intrinsics
ClosedPublic

Authored by benshi001 on Jul 28 2023, 7:34 AM.

Diff Detail

Event Timeline

benshi001 created this revision.Jul 28 2023, 7:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 7:34 AM
benshi001 requested review of this revision.Jul 28 2023, 7:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 7:34 AM
zixuan-wu added inline comments.Jul 31 2023, 11:44 PM
llvm/test/CodeGen/CSKY/intrinsic.ll
25

It would be better to also test the condition that the second argument is zero

benshi001 updated this revision to Diff 545953.Aug 1 2023, 1:08 AM
benshi001 marked an inline comment as done.
zixuan-wu accepted this revision.Aug 1 2023, 1:18 AM
zixuan-wu added inline comments.
llvm/test/CodeGen/CSKY/intrinsic.ll
12

BTW. Because counting zeros is not expensive, it's a little opt to set isCheapToSpeculateCttz and isCheapToSpeculateCtlz as other targets. So that this sequence can be same as ctlz_1. Anyway, it's can be another patch.

This revision is now accepted and ready to land.Aug 1 2023, 1:18 AM
benshi001 marked an inline comment as done.Aug 1 2023, 2:05 AM
benshi001 added inline comments.
llvm/test/CodeGen/CSKY/intrinsic.ll
12

Thanks. I have made another patch https://reviews.llvm.org/D156780 for that.

benshi001 marked an inline comment as done.Aug 1 2023, 2:06 AM