Skip to content

Commit

Permalink
Merge pull request #7947 from tautschnig/bugfixes/vector-constant
Browse files Browse the repository at this point in the history
C front-end: support vector expressions as compile-time constants
  • Loading branch information
kroening authored Oct 18, 2023
2 parents c1ef4df + 4efe440 commit 09236f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions regression/ansi-c/MMX2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ int main()
int nonsense1;
#ifdef __MMX__
__m128i qq = {0};
__m128 f = {1.0f, 1.0f, 1.0f, 1.0f};
#endif
return (0);
}
2 changes: 1 addition & 1 deletion src/ansi-c/c_typecheck_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4568,7 +4568,7 @@ class is_compile_time_constantt
e.id() == ID_le || e.id() == ID_gt || e.id() == ID_ge ||
e.id() == ID_if || e.id() == ID_not || e.id() == ID_and ||
e.id() == ID_or || e.id() == ID_bitnot || e.id() == ID_bitand ||
e.id() == ID_bitor || e.id() == ID_bitxor)
e.id() == ID_bitor || e.id() == ID_bitxor || e.id() == ID_vector)
{
return std::all_of(
e.operands().begin(), e.operands().end(), [this](const exprt &op) {
Expand Down

0 comments on commit 09236f9

Please sign in to comment.