On Wed, Dec 26, 2012 at 7:20 AM, Michael Goffioul
<
address@hidden> wrote:
> On Wed, Dec 26, 2012 at 12:01 AM, Max Brister <
address@hidden> wrote:
>>
>> Well, there was recently a new version of LLVM, it would be nice if
>> that just fixed the issue (I don't see anything relevant in the
>> release notes though).
>>
>> If that doesn't work, then we should try implementing complex numbers
>> as a llvm::ArrayType or llvm::StructureType internally in Octave.
>> Currently, complex numbers are implemented with an llvm::VectorType,
>> which LLVM emits vectorized assembly for. If I recall correctly, that
>> was causing MSVC to emit bad instructions. I can prepare a patch to do
>> this, if you want to try it.
>>
>> If that doesn't work, then we need to trace the execution of LLVM to
>> figure out why bad code is being generated.
>
>
> Note that IIRC, the problem was data alignment. GCC aligns by default on
> 16-bytes boundary, MSVC on 4-bytes. If LLVM assumes GCC alignment, then it
> can emit bad vectorized code.