This patch adds support for vector bool __int128 type for Power10.
Details
- Reviewers
hfinkel lei stefanp amyk - Group Reviewers
Restricted Project - Commits
- rGf4c337ab85c0: [PowerPC] Add support for vector bool __int128 for Power10
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/Parser/p10-vector-bool-128.c | ||
---|---|---|
2 | Just curious but does the RUN line require pwr10? |
clang/lib/Sema/DeclSpec.cpp | ||
---|---|---|
1155 | Not sure what you mean here. | |
1167 | I think you should only check for "power10-vector" since this requires pwr10? | |
clang/test/Parser/altivec-bool-128.c | ||
3 | test for -mcpu=pwr10 -target-feature -power10-vector and -mcpu=pwr10 -target-feature -vsx | |
clang/test/Parser/p10-vector-bool-128.c | ||
3 | add run line for feature cpu=pwr10 +power10-vector |
clang/lib/Sema/DeclSpec.cpp | ||
---|---|---|
1155 | Earlier comment had the Programming Interface Manual version number (PIM 2.1); asserting only char/int were valid with vector bool. | |
clang/test/Parser/altivec-bool-128.c | ||
3 | This test basically checks that VSX needs to be enabled to have vector bool __int128 type work. | |
clang/test/Parser/p10-vector-bool-128.c | ||
2 | Added pwr10. | |
3 | Added pwr10. |
clang/test/Parser/altivec-bool-128.c | ||
---|---|---|
3 | Yes. I am asking you to add a test to check that power10-vector is also needed to be enabled for this type to work. | |
clang/test/Parser/p10-vector-bool-128.c | ||
3 | cpu=pwr10 -vsx +power10-vector |
clang/lib/Sema/DeclSpec.cpp | ||
---|---|---|
1169 | Do we not need to add a check for int128 to this check as well? |
clang/lib/Sema/DeclSpec.cpp | ||
---|---|---|
1155 | Maybe need to add a TODO in all the sections of code, that you update, where it mentions PIM 2.1 |
clang/lib/Sema/DeclSpec.cpp | ||
---|---|---|
1155 | I have changed comment such that it does not need the document version. | |
clang/test/Parser/altivec-bool-128.c | ||
3 | Done, added a line for pwr10, +vsx and -power10-vector. | |
clang/test/Parser/p10-vector-bool-128.c | ||
3 | I have now added both -target-cpu pwr10 and -target-feature +power10-vector as you mentioned in the first comment. |
clang/lib/Sema/DeclSpec.cpp | ||
---|---|---|
1169 | No need here because this checks for type TST_int only. |
clang/test/Parser/p10-vector-bool-128.c | ||
---|---|---|
2 | I don't think you need -target-feature +altivec here. | |
3 | -vsx diable it, but the following +power10-vector should enable it. // RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -target-cpu pwr10 \ // RUN: -target-feature -vsx -target-feature +power10-vector | |
5 | this line shouldn't be needed. |
clang/test/Parser/p10-vector-bool-128.c | ||
---|---|---|
3 | Sorry, I did not accurately explain what happens if we disable vsx. ppcUserFeaturesCheck function in PPC.cpp ensures that any vsx dependant option cannot be turned on while simultaneously disabling vsx. So for this reason the above test line that you mentioned would not work. |
Other than Lei's concerns, personally I think this looks good to me.
clang/test/Parser/p10-vector-bool-128.c | ||
---|---|---|
7 | I believe this comment still needs to be addressed (of the line not being needed). |
clang/test/Parser/p10-vector-bool-128.c | ||
---|---|---|
7 | I think this was for a line removed earlier. |
LGTM, please address the 1 comment I have on commit.
clang/test/Parser/altivec-bool-128.c | ||
---|---|---|
7 | I don't think this is needed here -target-feature +altivec |
Not sure what you mean here.