If half is undef, and the other half is X (either true or false), this will fall under the if statements before the call to this function in visitSELECT. Around line 4707 (isBuildVectorAll{Zeros,Ones}). I also added a comment at the call site of this function. Filipe http://reviews.llvm.org/D3916