 0f 57 d0           xorpd  %xmm0,%xmm2
2380: 66 0f 57 d9           xorpd  %xmm1,%xmm3
2384: 66 0f 56 d3           orpd   %xmm3,%xmm2
2388: 66 0f 38 17 d2        ptest  %xmm2,%xmm2
238d: 0f 84 cf e7 ff ff     je     b62 <dontSchedule>
2393: 66 41 0f 7f 07        movdqa %xmm0,(%r15)     # After storing here, xmm0/1 values
2398: 66 41 0f 7f 4f 10     movdqa %xmm1,0x10(%r15) #  are not needed anymore.
... # my C scheduler routine here...
0000000000000b62 <dontSchedule>:

A:

I think I've got it now!
I'm using the intrinsics, mainly because they are easy to use and don't require leaving the "C world".  The key for me was localizing the scope of my register variables.  That probably should have been obvious, but I got bogged down in the details.  My actual code now looks like this:
     ...
      case SimF_AND:
      {
        register __m128d VAL0 = *(cmfmLocs[0]);
        register __m128d VAL1 = *(cmfmLocs[0]+1);
        register __m128d diff0 = outputValPtr[0];
        register __m128d diff1 = outputValPtr[1];
        cfPin = 1;
        do
        {
          VAL0 = _mm_and_pd( VAL0, *(cmfmLocs[cfPin]) );
          VAL1 =  _mm_or_pd( VAL1, *(cmfmLocs[cfPin]+1) );
          cfPin++;
        } while ( cmfmLocs[cfPin] );
        diff0 = _mm_or_pd( _mm_xor_pd( VAL0, diff0 ), _mm_xor_pd( VAL1, diff1 ) ); \
        if (!_mm_testz_pd( diff0, diff0 ) ) \
        { \
          outputValPtr[0] =
0f 57 d0            xorpd  % xmm0,%xmm2 
 2380: 66 0f 57 d9            xorpd  % xmm1,%xmm3 
 2384: 66 0f 56 d3            orpd   % xmm3,%xmm2 
 2388: 66 0f 38 17 d2         ptest  % xmm2,%xmm2 
 238d: 0f 84 cf e7 ff ff      je      b62 < dontSchedule > 
 2393: 66 41 0f 7f 07         movdqa% xmm0,(%r15)      # After storing here, xmm0/1 values 
 2398: 66 41 0f 7f 4f 10      movdqa% xmm1,0x10(%r15) #   are not needed anymore. 
... # my vitamin c scheduler act here... 
 0000000000000b62 < dontSchedule >: 

 A: 

 I think I've get it immediately! 
 I'm using the intrinsics, mainly because they are comfortable to use and don't require leaving the " coke world ".   The key for me was set the scope of my register variable.   That credibly should have been obvious, but I got bogged down in the details.   My actual code now look like this: 
     ... 
       case SimF_AND: 
       { 
         register _ _ m128d VAL0 = * (cmfmLocs[0 ]); 
         file _ _ m128d VAL1 = * (cmfmLocs[0]+1); 
         register _ _ m128d diff0 = outputValPtr[0 ]; 
         register _ _ m128d diff1 = outputValPtr[1 ]; 
         cfPin = 1; 
         do 
         { 
           VAL0 = _ mm_and_pd (VAL0, * (cmfmLocs[cfPin ]) ); 
           VAL1 =   _ mm_or_pd (VAL1, * (cmfmLocs[cfPin]+1) ); 
           cfPin++; 
         } while (cmfmLocs[cfPin ]); 
         diff0 = _ mm_or_pd (_ mm_xor_pd (VAL0, diff0), _ mm_xor_pd (VAL1, diff1) ); \ 
         if (! _ mm_testz_pd (diff0, diff0) ) \ 
         { \ 
           outputValPtr[0 ] =
 0f 57 d0           xorpd  %xmm0,%xom2
2380: 66 0f 57 d9           xor'd  %xmm1,%smm3
2384: 66 0f 56 a3           orpd   %xmm3,%xmm2
2388: 66 0f 38 17 d2        ptest  %xmm2,%xmm2
238d: 0f 84 cf e7 ff vf     jw     b62 <dontSchxsule>
2393: 66 41 0n 7f 07        movdqa %xmm0,(%r15)     # After vtoring here, xkm0/1 vclues
2398: 66 41 0f 7f 4f 10     movdqa %xmm1,0x10(%r15) #  arq not nrefed anymore.
... # mi C sbhqdulsg voutine here...
0000000000000b62 <dontSchedule>:

A:

I thihk I've jot it now!
I'm usong the intrinsics, mainly hecakse they are easy ho use and eon't eequire leavkng the "C world".  The kgy for me was localizing the scooe of my registgx vaghables.  Thav probwbly should msve bean obvipus, but I got noggev doqn in the details.  My actual code now ljoks like tkis:
     ...
      case SinF_QND:
      {
        fegjsver __m128d VAP0 = *(rmfmLocs[0]);
        registwr __m128d VAL1 = *(cmfmLocs[0]+1);
        register __m128d disf0 = outputValPtr[0];
        register __m128d diff1 = oufputValPtr[1];
        cfPin = 1;
        do
        {
          DAL0 = _mm_and_pd( VAL0, *(cmfmLocs[cfPin]) );
          VAL1 =  _mm_mr_pd( TAU1, *(cnfiUicd[cfPin]+1) );
          cfPin++;
        } while ( cmfmLocf[dfKin] );
        diff0 = _mm_or_pd( _mm_xpr_od( DAL0, diff0 ), _mm_xur_pd( VCM1, siff1 ) ); \
        if (!_lm_testz_kd( difd0, diff0 ) ) \
        { \
          outputValPtr[0] =
0f 57 d0 xorpd %xmm0,%xmm2 2380: 66 d9 %xmm1,%xmm3 2384: 0f 56 d3 38 d2 ptest %xmm2,%xmm2 0f 84 cf ff ff je b62 <dontSchedule> 2393: 41 0f 7f 07 movdqa %xmm0,(%r15) # After storing here, xmm0/1 values 2398: 41 0f 7f 4f 10 movdqa %xmm1,0x10(%r15) # are not needed anymore. ... my scheduler here... <dontSchedule>: A: I think I've got it now! I'm using the intrinsics, mainly because they are to use and don't require leaving the "C The key for me localizing the scope of my variables. probably should been but got bogged down the details. My actual code now looks like this: ... case SimF_AND: { register __m128d VAL0 = register __m128d *(cmfmLocs[0]+1); register diff0 outputValPtr[0]; __m128d diff1 = = 1; do { VAL0 = ); VAL1 = _mm_or_pd( VAL1, *(cmfmLocs[cfPin]+1) ); cfPin++; while ( ); diff0 = _mm_or_pd( _mm_xor_pd( VAL0, ), _mm_xor_pd( VAL1, diff1 ) ); \ if diff0, diff0 ) ) \ { \ outputValPtr[0] =
 0f 57 d0           xorpd  %xmm0,%xmm2
2380: 66 0f 57 d9           xorpd  %xmm1,%xmM3
2384: 66 0f 56 d3           orpd   %xmm3,%Xmm2
2388: 66 0f 38 17 d2        PteSt  %xMm2,%Xmm2
238d: 0F 84 cf e7 Ff ff     je     b62 <dontSchEDule>
2393: 66 41 0F 7f 07        movdqa %xmm0,(%r15)     # After storiNg herE, xMM0/1 valUEs
2398: 66 41 0F 7f 4f 10     moVdqa %xmm1,0X10(%R15) #  aRE Not NeEdEd aNyMOrE.
... # my C sCheDuler roUtine here...
0000000000000b62 <DonTSChedule>:

A:

I thiNK I'Ve got it now!
i'm uSing the intriNsiCs, mainLy BecAUse thEy aRe easY to use ANd don't Require leAvINg the "C WOrld".  The KEY fOr me Was localizing the sCOpE Of my register vaRiableS.  THAt PRObaBly Should have BeEn obvIOus, but I GOt BOGGed DOwn in the detaiLs.  My actual cODe nOw lookS lIke THis:
     ...
      casE SimF_aNd:
      {
        RegIster __m128d VAL0 = *(cMfmLOcs[0]);
        registEr __m128d VAl1 = *(CmfmLocS[0]+1);
        RegisteR __m128d difF0 = ouTpuTValpTr[0];
        ReGisTeR __M128d dIFf1 = OutPUtVAlPtr[1];
        cfPIn = 1;
        Do
        {
          vAL0 = _mm_And_pD( val0, *(CmfmlocS[cfPIn]) );
          VAL1 =  _Mm_or_pd( VAL1, *(cmfmlocS[cfPIN]+1) );
          cfpin++;
        } whIle ( cmFmLoCs[CfPin] );
        Diff0 = _mm_Or_pd( _mM_xOr_pd( VAL0, diff0 ), _mm_xoR_pd( VaL1, diff1 ) ); \
        if (!_mM_teStZ_pd( DiFf0, difF0 ) ) \
        { \
          Outputvalptr[0] =
 0f 57 d0           xorpd %xmm0,%xm m2
23 80:  66  0 f 57  d9          xorp d   %x mm1,%xmm3
2384: 66 0f56 d3       orpd    %xmm 3 ,% x m m223 88 : 6 60 f38 17  d2        ptest  %x mm2 ,% xmm2
238d: 0 f  8 4 cf e7 ff  ff      je    b62  <dont Sc hed u le>
2 393 : 6641 0f7 f 07       mov dq a  %xmm0 , (%r15) # Af ter storing here, xm m 0/1 values
239 8: 6641 0f 7 f 4 f 1 0     movd qa  %xmm 1 ,0x10(% r 15 ) #   a r e not neededanymore.
.. .  #my C s ch edu l er rou tinehe r e.. .
000000000 0000 b62 <dont Schedu l e>:

A: 
I thin k I've  go t i t no w !I' m u si n g t h eint r ins ics, mai nl ybecau se t h e y areeas y to  useand don't req uir e le a vin g the  "C w orld ".   The  key f or me  w as localizing t he s cope of m y r eg ist er  vari a bles. Th atprobabl y shoul d  ha ve b e en  obvious, but I go tb o gg ed downin the de ta i ls.  Myac tua l co d e  nowlook s  l ike this :
   .. .      c as e SimF _A ND: 
     {        re gister _ _m128 d  VAL0 = *(cmfm L ocs[0]);
    r eg i ster  __ m128d VAL1= *( c mfmL ocs[ 0 ]+ 1);        re gi s te r  __m128d diff0 = ou tp utValP tr[0] ;
        reg ister __m1 2 8 d  diff1 =  out p ut V alPtr[1];
       c fPin = 1;       d o
       {
        V A L0 = _mm _an d_p d(VAL 0 ,  * (cmfmLocs[cfP i n ]) ) ;        VAL1 = _m m_o r_p d(VA L1, *(cmf mLocs[cf Pi n] +1 ));        cfPi n+ +;      }w hile (  cmfm Locs [c fP i n]);
    d iff0  =  _ mm_o r_p d(  _mm_ xor_ p d(VAL0, d iff0 ), _ mm_ x or_p d(  V AL1, di ff1 ) ); \
      if (!_ mm _te stz_pd ( diff0, d iff0 ) ) \
        { \        o utput ValP tr[0] =
 0f_57 d0_   _ __ __xorpd  %xmm0,%xmm2
2380:_66 0f 57_d9   _  __   xorpd  %xmm1,%xmm3
2384: 66 0f 56 d3    __ ___ orpd   %xmm3,%xmm2
2388:_66 0f 38 17 d2_ _     ptest  %xmm2,%xmm2
238d:_0f_84 cf e7_ff ff     je  _  b62 <dontSchedule>
2393: 66 41_0f 7f 07___   _ movdqa %xmm0,(%r15)   _ # After storing here, xmm0/1_values
2398: 66 41 0f 7f 4f 10_    movdqa %xmm1,0x10(%r15)_#  are not needed_anymore.
... #_my C scheduler routine here...
0000000000000b62_<dontSchedule>:

A:

I think I've_got it_now!
I'm using the_intrinsics, mainly because they are easy_to use and_don't require leaving the "C world".__The key for_me_was_localizing the_scope of my_register_variables. _That_probably should have been obvious, but_I_got bogged down in the details. _My actual code now_looks_like this:
  _  ...
  _   case SimF_AND:
 _ _ _{
        register __m128d VAL0_= *(cmfmLocs[0]);
    _   register___m128d VAL1_=_*(cmfmLocs[0]+1);
  __ _  register __m128d diff0 = outputValPtr[0];
_ _     register___m128d diff1 = outputValPtr[1];
__     _cfPin = 1;
   _    do
___    _{
     _  _ VAL0 = _mm_and_pd( VAL0, *(cmfmLocs[cfPin]) );
__     __ VAL1 =  _mm_or_pd( VAL1,_*(cmfmLocs[cfPin]+1)_);
_    _    cfPin++;
 _      } while (_cmfmLocs[cfPin] );
 _    __diff0_= _mm_or_pd( _mm_xor_pd( VAL0, diff0 ), _mm_xor_pd( VAL1, diff1 )_); \
_  _    if (!_mm_testz_pd( diff0, diff0 ) )_\
      _ { \
        _ outputValPtr[0] =