__syncthreads & possible deadlock situation?

I am wondering if this code might pose a possible deadlock:

__global__ void



  // do some computation for val

  if( val > threshold )



  // do some computation with val & store it



So does __syncthreads() try to wait for terminated threads or did I just get lucky with my if branch never executing?

__syncthreads() does not wait for terminated threads. This code will deadlock if val is greater than threshold in some threads in a block and not others

Thanks, that’s what I was afraid of.