[LLVMbugs] [Bug 10423] I think alignment policy of argument is *too strict*

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 20 06:15:47 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10423

Anton Korobeynikov <asl at math.spbu.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Anton Korobeynikov <asl at math.spbu.ru> 2011-07-20 08:15:47 CDT ---
Well, as it seems to me vcpp does not align your vec3. Which is quite expected
- you have *just struct* and have not provided any alignment specification on
it.

3 x float is not a native type for the givent target and thus is promoted to 4
x float, which has alignment requirements by the platform ABI (and thus such
requirements cannot be relaxed at LLVM level, really).

So, the fix for you is to correct define your vec3 type and force the alignment
at C level. I dunno for vcpp, but in gcc you can do this via specifying of
attribute "aligned".

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list