Skip to content

Commit

Permalink
fix Issue 17215 - ICE(cgcod.c:findreg) with SIMD and -O -inline
Browse files Browse the repository at this point in the history
- caused by assigning 2*REGSIZE XMM vectors partially
- only triggers since SROA sees this 8 bytes access
  • Loading branch information
MartinNowak committed Feb 24, 2017
1 parent 0f4ce2f commit 46d1948
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/cgelem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3511,7 +3511,7 @@ STATIC elem * eleq(elem *e, goal_t goal)
e1->Eoper == OPvar &&
e2->Eoper == OPvar &&
goal == GOALnone &&
!tyfloating(e1->Ety)
!tyfloating(e1->Ety) && !tyvector(e1->Ety)
)
{
tym_t ty = (REGSIZE == 8) ? TYllong : TYint;
Expand Down
9 changes: 9 additions & 0 deletions test/compilable/test17215.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// REQUIRED_ARGS: -O
version (X86_64):
alias vec = __vector(int[4]);

vec binop(vec a)
{
vec b = a;
return b;
}

0 comments on commit 46d1948

Please sign in to comment.