Skip to content

C front-end: __builtin_shuffle, __builtin_shufflevector #5913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

tautschnig
Copy link
Collaborator

These are polymorphic built-ins supported by GCC and Clang,
respectively. Introduce a new shuffle_vector expression to handle these,
with type checking addressing the differences between the GCC/Clang
APIs.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #5913 (de4557f) into develop (95e1161) will decrease coverage by 0.00%.
The diff coverage is 64.80%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5913      +/-   ##
===========================================
- Coverage    75.02%   75.01%   -0.01%     
===========================================
  Files         1431     1433       +2     
  Lines       155595   155701     +106     
===========================================
+ Hits        116734   116806      +72     
- Misses       38861    38895      +34     
Impacted Files Coverage Δ
src/ansi-c/c_typecheck_base.h 100.00% <ø> (ø)
...rc/ansi-c/c_typecheck_gcc_polymorphic_builtins.cpp 76.58% <45.07%> (-4.36%) ⬇️
src/ansi-c/c_typecheck_expr.cpp 75.23% <66.66%> (-0.06%) ⬇️
src/ansi-c/c_expr.cpp 96.55% <96.55%> (ø)
src/ansi-c/c_expr.h 100.00% <100.00%> (ø)
src/solvers/smt2/smt2_parser.cpp 70.87% <0.00%> (+0.06%) ⬆️
...olvers/strings/string_constraint_instantiation.cpp 94.69% <0.00%> (+3.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be4e768...de4557f. Read the comment docs.

@kroening
Copy link
Member

I would put the new expressions into ansi-c/c_expr.h and .cpp -- while it's conceivable that there might be another frontend with expressions like these, it's specific dialects of C for now.

These are polymorphic built-ins supported by GCC and Clang,
respectively. Introduce a new shuffle_vector expression to handle these,
with type checking addressing the differences between the GCC/Clang
APIs.
@tautschnig tautschnig merged commit ab538eb into diffblue:develop Mar 25, 2021
@tautschnig tautschnig deleted the shuffle branch March 25, 2021 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants