-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] Implement __builtin_popcountg (#82359)
Fixes #82058.
- Loading branch information
1 parent
841a416
commit 21d8332
Showing
7 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -fsyntax-only -verify -Wpedantic %s | ||
|
||
typedef int int2 __attribute__((ext_vector_type(2))); | ||
|
||
void test_builtin_popcountg(int i, double d, int2 i2) { | ||
__builtin_popcountg(); | ||
// expected-error@-1 {{too few arguments to function call, expected 1, have 0}} | ||
__builtin_popcountg(i, i); | ||
// expected-error@-1 {{too many arguments to function call, expected 1, have 2}} | ||
__builtin_popcountg(d); | ||
// expected-error@-1 {{1st argument must be a type of integer (was 'double')}} | ||
__builtin_popcountg(i2); | ||
// expected-error@-1 {{1st argument must be a type of integer (was 'int2' (vector of 2 'int' values))}} | ||
} |