This patch adds range checking for some Power10 altivec builtins and
changes the signature of a builtin to match documentation. For vec_cntm,
range checking is done via SemaChecking. For vec_splati_ins, the second
argument is masked to extract the 0th bit so that we always receive either a 0
or a 1.
Details
- Reviewers
nemanjai lei stefanp amyk - Group Reviewers
Restricted Project - Commits
- rGf9912fe4eac9: [PowerPC] Add range checks for P10 Vector Builtins
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
builtins-ppc-p10vector.c looks like it needs to be updated from the failing test case.
clang/test/CodeGen/builtins-ppc-p10vector.c | ||
---|---|---|
1373 | Is the i32 supposed to be on the first argument? |
clang/test/CodeGen/builtins-ppc-p10vector.c | ||
---|---|---|
1414 | Need to add a testcase where param b to vec_splati_ins(a,b,c) is not 0 or 1. |
Adding a testcase where the second parameter of vec_splati_ins is out of the range 0,1.
LGTM
Please add comment to tc upon commit.
clang/test/CodeGen/builtins-ppc-p10vector.c | ||
---|---|---|
1417 | nit: pleases add a comment here explaining behaviour for when param 2 is out of expected value range. |
clang-tidy: error: "AltiVec support not enabled" [clang-diagnostic-error]
not useful