Questions about the instruction selection for sse2 intrinsic with -O optimization

Jim Wilson wilson@specifixinc.com
Wed Mar 10 02:05:00 GMT 2004


haibo wrote:
> I wonder when and where gcc do these things in source code,
> I have tried to step into the source code,and it do reach the code that
> processes the _mm_insert_epi16 intrinsics and emit the rtl for it,but 
> when gcc do insn match,It doesn't math it with sse2_pinsrw.

This is a bit too vague to easily answer.

You didn't provide a proper testcase that I can compile.  You didn't
provide example RTL dumps, so I am not sure exactly what you are
complaining about.

I am guessing that the pattern that the sse2_pinsrw pattern emitted is
also matched by other patterns, and hence you got other instructions.
This might be an optimization.  This might be an accidental bug.  It
might be a false impression on your part that the mm_insert_epi16
intrinsic should always map to a pinsrw instruction.  There isn't enough
information here to tell.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list