Enable select instruction handling in complex addr modes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
To enable select I needed to update one test. Added test creator for the review whether he is ok with this change.
Comment Actions
To make a review easier, the generated code before this patch:
.globl BinarySearch # -- Begin function BinarySearch .p2align 4, 0x90 .type BinarySearch,@function BinarySearch: # @BinarySearch .cfi_startproc # %bb.0: # %entry movl (%rsi), %eax jmp .LBB4_2 .p2align 4, 0x90 .LBB4_1: # %while.body # in Loop: Header=BB4_2 Depth=1 movl %ecx, %eax leaq 16(%rdx), %rcx addq $8, %rdx btl %eax, %edi cmovaeq %rcx, %rdx movq (%rdx), %rdx .LBB4_2: # %while.body # =>This Inner Loop Header: Depth=1 movl (%rdx), %ecx cmpl %ecx, %eax ja .LBB4_1 # %bb.3: # %while.end retq .Lfunc_end4: .size BinarySearch, .Lfunc_end4-BinarySearch .cfi_endproc
The generated code after this patch:
.globl BinarySearch # -- Begin function BinarySearch .p2align 4, 0x90 .type BinarySearch,@function BinarySearch: # @BinarySearch .cfi_startproc # %bb.0: # %entry movl (%rsi), %eax jmp .LBB4_2 .p2align 4, 0x90 .LBB4_1: # %while.body # in Loop: Header=BB4_2 Depth=1 movl %ecx, %eax xorl %ecx, %ecx btl %eax, %edi setae %cl movq 8(%rdx,%rcx,8), %rdx .LBB4_2: # %while.body # =>This Inner Loop Header: Depth=1 movl (%rdx), %ecx cmpl %ecx, %eax ja .LBB4_1 # %bb.3: # %while.end retq .Lfunc_end4: .size BinarySearch, .Lfunc_end4-BinarySearch .cfi_endproc
Comment Actions
The code change here is a clear improvement. Given no response from the test case author, LGTM.