Skip to content

Commit 09236f9

Browse files
authored
Merge pull request #7947 from tautschnig/bugfixes/vector-constant
C front-end: support vector expressions as compile-time constants
2 parents c1ef4df + 4efe440 commit 09236f9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

regression/ansi-c/MMX2/main.c

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ int main()
77
int nonsense1;
88
#ifdef __MMX__
99
__m128i qq = {0};
10+
__m128 f = {1.0f, 1.0f, 1.0f, 1.0f};
1011
#endif
1112
return (0);
1213
}

src/ansi-c/c_typecheck_expr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4568,7 +4568,7 @@ class is_compile_time_constantt
45684568
e.id() == ID_le || e.id() == ID_gt || e.id() == ID_ge ||
45694569
e.id() == ID_if || e.id() == ID_not || e.id() == ID_and ||
45704570
e.id() == ID_or || e.id() == ID_bitnot || e.id() == ID_bitand ||
4571-
e.id() == ID_bitor || e.id() == ID_bitxor)
4571+
e.id() == ID_bitor || e.id() == ID_bitxor || e.id() == ID_vector)
45724572
{
45734573
return std::all_of(
45744574
e.operands().begin(), e.operands().end(), [this](const exprt &op) {

0 commit comments

Comments
 (0)