This is an archive of the discontinued LLVM Phabricator instance.

[CSKY] Optimize implementation of intrinsic 'llvm.cttz.i32'
ClosedPublic

Authored by benshi001 on Jul 6 2023, 2:40 AM.

Details

Reviewers
zixuan-wu

Diff Detail

Event Timeline

benshi001 created this revision.Jul 6 2023, 2:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2023, 2:40 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
benshi001 requested review of this revision.Jul 6 2023, 2:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2023, 2:40 AM
benshi001 updated this revision to Diff 538009.Jul 6 2023, 11:42 PM
benshi001 updated this revision to Diff 538356.Jul 8 2023, 4:53 AM
benshi001 set the repository for this revision to rG LLVM Github Monorepo.
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2023, 4:53 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
benshi001 added inline comments.Jul 8 2023, 4:54 AM
clang/test/CodeGen/CSKY/csky-builtins.c
1 ↗(On Diff #538356)

This file is pure test, has nothing to do with llvm.cttz, just to avoid another patch.

zixuan-wu added inline comments.Jul 28 2023, 1:34 AM
clang/test/CodeGen/CSKY/csky-builtins.c
1 ↗(On Diff #538356)

Don't make unrelated patch together in one single commit.

67 ↗(On Diff #538356)

Those are target-independent intrinsics/builtins. I think it's no more need to test for specific target such as csky again, unless it's different behavior or output.

llvm/test/CodeGen/CSKY/intrinsic.ll
53

Again. It's related to cttz?

benshi001 updated this revision to Diff 545152.Jul 28 2023, 7:19 AM
benshi001 updated this revision to Diff 545158.Jul 28 2023, 7:31 AM
benshi001 marked 2 inline comments as done.
benshi001 added inline comments.
clang/test/CodeGen/CSKY/csky-builtins.c
67 ↗(On Diff #538356)

removed.

benshi001 added inline comments.Jul 28 2023, 7:36 AM
llvm/test/CodeGen/CSKY/intrinsic.ll
53

I have made another patch for these additional tests.
https://reviews.llvm.org/D156543

zixuan-wu added inline comments.Jul 31 2023, 11:38 PM
llvm/test/CodeGen/CSKY/intrinsic.ll
21

I think we can also test the condition that the second argument is zero.

benshi001 updated this revision to Diff 545952.Aug 1 2023, 1:08 AM
benshi001 marked an inline comment as done.
zixuan-wu accepted this revision.Aug 1 2023, 1:18 AM
This revision is now accepted and ready to land.Aug 1 2023, 1:18 AM