Optimize sequence:
%sel = V_CNDMASK_B32_e64 0, 1, %cc %cmp = V_CMP_NE_U32 1, %1 $vcc = S_AND_B64 $exec, %cmp S_CBRANCH_VCC[N]Z
>
$vcc = S_ANDN2_B64 $exec, %cc S_CBRANCH_VCC[N]Z
It is the negation pattern inserted by DAGCombiner::visitBRCOND() in the rebuildSetCC().
Does this (and the other findReachingDef) need to be guarded to ensure the instructions come from the same basic block?
Or, to be more precise, against changes to EXEC in between?