This will generate this: testb $1, %dil movl $42, %eax movl $31415, %ecx cmovnel %eax, %ecx movl $4048, %edx movl $666, %eax cmovnel %edx, %eax addl %ecx, %eax retq instead of this: andb $1, %dil movl $4048, %eax movl $666, %ecx cmovnel %eax, %ecx testb %dil, %dil movl $42, %edx movl $31415, %eax cmovnel %edx, %eax addl %ecx, %eax retq for this example: define i32 @test(i1 %c) { entry: %0 = select i1 %c, i32 42, i32 31415 %1 = select i1 %c, i32 4048, i32 666 %ret = add i32 %0, %1 ret i32 %ret }
Details
Details
- Reviewers
craig.topper aaboud bkramer RKSimon spatel
Diff Detail
Diff Detail
Event Timeline
Comment Actions
It looks like Chandler's patch D37096 might also be fixing some of this and that might be a more consistent fix. I'd like to hold off on this until we disposition that patch.