Page MenuHomePhabricator

[SVE] Remove calls to VectorType::getNumElements from clang
Needs ReviewPublic

Authored by ctetreau on Jun 25 2020, 10:31 AM.

Diff Detail

Event Timeline

ctetreau created this revision.Jun 25 2020, 10:31 AM
c-rhodes added inline comments.Thu, Jul 23, 1:28 AM
clang/lib/CodeGen/CGBuiltin.cpp
5615–5617

Is there a reason you can't do a single cast here?

ctetreau marked an inline comment as done.Thu, Jul 23, 8:16 AM
ctetreau added inline comments.
clang/lib/CodeGen/CGBuiltin.cpp
5615–5617

GetNeonType should probably just return a FixedVectorType.

ctetreau updated this revision to Diff 280254.Thu, Jul 23, 2:08 PM

address code review issues

there's a few places the getNumElements calls can be fixed by getting the initial cast right

clang/lib/CodeGen/CGBuiltin.cpp
5986

cast here

9872

cast here

clang/lib/CodeGen/CGExpr.cpp
1765

cast here

1799

cast here

2214

missed one here

clang/lib/CodeGen/CGExprScalar.cpp
1638

cast here

clang/lib/CodeGen/SwiftCallingConv.cpp
321

cast here