For this code: bb122: %tmp124 = ptrtoint %struct.TypHeader* %hdR to bool %i.3.in.in = select bool %tmp124, %struct.TypHeader* %hdR, %struct.TypHeader* %hdL %hdR_addr.0 = select bool %tmp124, %struct.TypHeader* %hdL, %struct.TypHeader* %hdR llc is generating: .BB1_3: #bb122 movl %eax, %ebx # TRUNCATE movb %bl, %bl testb %bl, %bl movl %eax, %edi cmovne %esi, %edi testb %bl, %bl cmovne %eax, %esi It looks like the recent DAGCombiner changes missed a case for the select instruction. Test cases will be attached.
Created attachment 477 [details] bugpoint reduced test case
Created attachment 478 [details] llvm assembly corresponding to reduced test case
Created attachment 479 [details] generated x86 assembly code
Fixed, patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061127/040313.html -Chris