Skip to content

Commit

Permalink
Merge pull request #6626 from MartinNowak/issue10226
Browse files Browse the repository at this point in the history
partly resolve Issue 10226 - inefficient core.simd codegen
  • Loading branch information
WalterBright authored Mar 15, 2017
2 parents a7b2a39 + 194fa0a commit 0d4eb1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ddmd/backend/glocal.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,12 @@ STATIC void local_exp(elem *e,int goal)
{
if (tysize(em->Ety) == tysize(e->Ety) &&
em->E1->EV.sp.Voffset == e->EV.sp.Voffset &&
(tyfloating(em->Ety) != 0) == (tyfloating(e->Ety) != 0) &&
((tyfloating(em->Ety) != 0) == (tyfloating(e->Ety) != 0) ||
/** Hack to fix https://issues.dlang.org/show_bug.cgi?id=10226
* Recognize assignments of float vectors to void16, as used by
* core.simd intrinsics. The backend type for void16 is Tschar16!
*/
(tyvector(em->Ety) != 0) == (tyvector(e->Ety) != 0) && tybasic(e->Ety) == TYschar16) &&
!local_preserveAssignmentTo(em->E1->Ety))
{
#ifdef DEBUG
Expand Down

0 comments on commit 0d4eb1f

Please sign in to comment.