Home Dashboard Directory Help
Search

_mm256_broadcastsi128_si256 creates a temporary variable on stack by Gabest


Status: 

Closed
 as Deferred Help for as Deferred


1
0
Sign in
to vote
Type: Bug
ID: 790352
Opened: 6/17/2013 10:38:59 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

There is a missed optimization for vbroadcasti128. The problem here is that its source operand is a m128, the compiler cannot directly use a register or __m128i value type, so it has to save it onto the stack first. That is understandable, however there should be a way to directly use this instruction with a pointer, the compiler should either figure it out how to do that, or we need a function with this signature: _mm256_broadcastsi128_si256(const __m128* m), notice the pointer type for the input. I don't know who decided this in the first place, he was obviously unaware of the nature of the underlying machine instruction, probably some folks at intel.

And there is no _mm256_broadcastf128_f256, for vbroadcastf128, but that's basically the same thing.
Details
Sign in to post a comment.
Posted by Microsoft on 6/26/2013 at 4:34 PM
Thank you for reporting this AVX code generation issue. We are tracking it and will fix it in a future release of the VC++ compiler.

VC++ Compiler Team.
Posted by Microsoft on 6/20/2013 at 12:35 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Gabest on 6/18/2013 at 2:27 AM
Attached a zipped project. Basically, it's just a main around this example. There is also a generated asm file inside, can be looked at without loading it up and compiling.
Posted by Microsoft on 6/18/2013 at 2:06 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 6/17/2013 at 10:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
ConsoleApplication1.zip 6/18/2013 5 KB