[Issue 7509] Allow SIMD variable contents to have all their values	changed to a single float variable
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Apr  8 12:51:37 PDT 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=7509
Martin Nowak <code at dawg.eu> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at dawg.eu
--- Comment #5 from Martin Nowak <code at dawg.eu> 2013-04-08 12:51:33 PDT ---
Actually GDC and LDC are capable of generating optimal code for scalar to
vector assignment.
auto foo(float a)
{
    __vector(float[4]) va = void;
    va = 2 * a;
    return va;
}
> I think this should be prohibited at all costs.
It's not helpful that dmd currently disallows this assignment
because it promotes usage of 'vec.array = val' which uses the stack.
Of course one could write a library wrapper but isn't it much
better to leave this to the compiler?
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list