forked from OSchip/llvm-project
[ExpandMemCmp][NFC] Add more tests.
This commit is contained in:
parent
512767eb3f
commit
ffe3515aa7
|
@ -573,6 +573,73 @@ define i1 @length5_lt(i8* %X, i8* %Y) nounwind {
|
|||
ret i1 %c
|
||||
}
|
||||
|
||||
define i32 @length7(i8* %X, i8* %Y) nounwind {
|
||||
; X86-LABEL: length7:
|
||||
; X86: # %bb.0:
|
||||
; X86-NEXT: pushl %esi
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; X86-NEXT: movl (%eax), %edx
|
||||
; X86-NEXT: movl (%ecx), %esi
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: bswapl %esi
|
||||
; X86-NEXT: cmpl %esi, %edx
|
||||
; X86-NEXT: jne .LBB19_4
|
||||
; X86-NEXT: # %bb.1: # %loadbb1
|
||||
; X86-NEXT: movzwl 4(%eax), %edx
|
||||
; X86-NEXT: movzwl 4(%ecx), %esi
|
||||
; X86-NEXT: rolw $8, %dx
|
||||
; X86-NEXT: rolw $8, %si
|
||||
; X86-NEXT: movzwl %dx, %edx
|
||||
; X86-NEXT: movzwl %si, %esi
|
||||
; X86-NEXT: cmpl %esi, %edx
|
||||
; X86-NEXT: jne .LBB19_4
|
||||
; X86-NEXT: # %bb.2: # %loadbb2
|
||||
; X86-NEXT: movzbl 6(%eax), %eax
|
||||
; X86-NEXT: movzbl 6(%ecx), %ecx
|
||||
; X86-NEXT: subl %ecx, %eax
|
||||
; X86-NEXT: popl %esi
|
||||
; X86-NEXT: retl
|
||||
; X86-NEXT: .LBB19_4: # %res_block
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %esi, %edx
|
||||
; X86-NEXT: setae %al
|
||||
; X86-NEXT: leal -1(%eax,%eax), %eax
|
||||
; X86-NEXT: popl %esi
|
||||
; X86-NEXT: retl
|
||||
;
|
||||
; X64-LABEL: length7:
|
||||
; X64: # %bb.0:
|
||||
; X64-NEXT: movl (%rdi), %eax
|
||||
; X64-NEXT: movl (%rsi), %ecx
|
||||
; X64-NEXT: bswapl %eax
|
||||
; X64-NEXT: bswapl %ecx
|
||||
; X64-NEXT: cmpl %ecx, %eax
|
||||
; X64-NEXT: jne .LBB19_4
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movzwl 4(%rdi), %eax
|
||||
; X64-NEXT: movzwl 4(%rsi), %ecx
|
||||
; X64-NEXT: rolw $8, %ax
|
||||
; X64-NEXT: rolw $8, %cx
|
||||
; X64-NEXT: movzwl %ax, %eax
|
||||
; X64-NEXT: movzwl %cx, %ecx
|
||||
; X64-NEXT: cmpl %ecx, %eax
|
||||
; X64-NEXT: jne .LBB19_4
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movzbl 6(%rdi), %eax
|
||||
; X64-NEXT: movzbl 6(%rsi), %ecx
|
||||
; X64-NEXT: subl %ecx, %eax
|
||||
; X64-NEXT: retq
|
||||
; X64-NEXT: .LBB19_4: # %res_block
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpl %ecx, %eax
|
||||
; X64-NEXT: setae %dl
|
||||
; X64-NEXT: leal -1(%rdx,%rdx), %eax
|
||||
; X64-NEXT: retq
|
||||
%m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 7) nounwind
|
||||
ret i32 %m
|
||||
}
|
||||
|
||||
define i1 @length7_eq(i8* %X, i8* %Y) nounwind {
|
||||
; X86-LABEL: length7_eq:
|
||||
; X86: # %bb.0:
|
||||
|
@ -600,6 +667,80 @@ define i1 @length7_eq(i8* %X, i8* %Y) nounwind {
|
|||
ret i1 %c
|
||||
}
|
||||
|
||||
define i1 @length7_lt(i8* %X, i8* %Y) nounwind {
|
||||
; X86-LABEL: length7_lt:
|
||||
; X86: # %bb.0:
|
||||
; X86-NEXT: pushl %esi
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; X86-NEXT: movl (%eax), %edx
|
||||
; X86-NEXT: movl (%ecx), %esi
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: bswapl %esi
|
||||
; X86-NEXT: cmpl %esi, %edx
|
||||
; X86-NEXT: jne .LBB21_4
|
||||
; X86-NEXT: # %bb.1: # %loadbb1
|
||||
; X86-NEXT: movzwl 4(%eax), %edx
|
||||
; X86-NEXT: movzwl 4(%ecx), %esi
|
||||
; X86-NEXT: rolw $8, %dx
|
||||
; X86-NEXT: rolw $8, %si
|
||||
; X86-NEXT: movzwl %dx, %edx
|
||||
; X86-NEXT: movzwl %si, %esi
|
||||
; X86-NEXT: cmpl %esi, %edx
|
||||
; X86-NEXT: jne .LBB21_4
|
||||
; X86-NEXT: # %bb.2: # %loadbb2
|
||||
; X86-NEXT: movzbl 6(%eax), %eax
|
||||
; X86-NEXT: movzbl 6(%ecx), %ecx
|
||||
; X86-NEXT: subl %ecx, %eax
|
||||
; X86-NEXT: jmp .LBB21_3
|
||||
; X86-NEXT: .LBB21_4: # %res_block
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %esi, %edx
|
||||
; X86-NEXT: setae %al
|
||||
; X86-NEXT: leal -1(%eax,%eax), %eax
|
||||
; X86-NEXT: .LBB21_3: # %endblock
|
||||
; X86-NEXT: shrl $31, %eax
|
||||
; X86-NEXT: # kill: def $al killed $al killed $eax
|
||||
; X86-NEXT: popl %esi
|
||||
; X86-NEXT: retl
|
||||
;
|
||||
; X64-LABEL: length7_lt:
|
||||
; X64: # %bb.0:
|
||||
; X64-NEXT: movl (%rdi), %eax
|
||||
; X64-NEXT: movl (%rsi), %ecx
|
||||
; X64-NEXT: bswapl %eax
|
||||
; X64-NEXT: bswapl %ecx
|
||||
; X64-NEXT: cmpl %ecx, %eax
|
||||
; X64-NEXT: jne .LBB21_3
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movzwl 4(%rdi), %eax
|
||||
; X64-NEXT: movzwl 4(%rsi), %ecx
|
||||
; X64-NEXT: rolw $8, %ax
|
||||
; X64-NEXT: rolw $8, %cx
|
||||
; X64-NEXT: movzwl %ax, %eax
|
||||
; X64-NEXT: movzwl %cx, %ecx
|
||||
; X64-NEXT: cmpl %ecx, %eax
|
||||
; X64-NEXT: jne .LBB21_3
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movzbl 6(%rdi), %eax
|
||||
; X64-NEXT: movzbl 6(%rsi), %ecx
|
||||
; X64-NEXT: subl %ecx, %eax
|
||||
; X64-NEXT: shrl $31, %eax
|
||||
; X64-NEXT: # kill: def $al killed $al killed $eax
|
||||
; X64-NEXT: retq
|
||||
; X64-NEXT: .LBB21_3: # %res_block
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpl %ecx, %eax
|
||||
; X64-NEXT: setae %dl
|
||||
; X64-NEXT: leal -1(%rdx,%rdx), %eax
|
||||
; X64-NEXT: shrl $31, %eax
|
||||
; X64-NEXT: # kill: def $al killed $al killed $eax
|
||||
; X64-NEXT: retq
|
||||
%m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 7) nounwind
|
||||
%c = icmp slt i32 %m, 0
|
||||
ret i1 %c
|
||||
}
|
||||
|
||||
define i32 @length8(i8* %X, i8* %Y) nounwind {
|
||||
; X86-LABEL: length8:
|
||||
; X86: # %bb.0:
|
||||
|
@ -611,7 +752,7 @@ define i32 @length8(i8* %X, i8* %Y) nounwind {
|
|||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB20_2
|
||||
; X86-NEXT: jne .LBB22_2
|
||||
; X86-NEXT: # %bb.1: # %loadbb1
|
||||
; X86-NEXT: movl 4(%esi), %ecx
|
||||
; X86-NEXT: movl 4(%eax), %edx
|
||||
|
@ -619,13 +760,13 @@ define i32 @length8(i8* %X, i8* %Y) nounwind {
|
|||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: je .LBB20_3
|
||||
; X86-NEXT: .LBB20_2: # %res_block
|
||||
; X86-NEXT: je .LBB22_3
|
||||
; X86-NEXT: .LBB22_2: # %res_block
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: setae %al
|
||||
; X86-NEXT: leal -1(%eax,%eax), %eax
|
||||
; X86-NEXT: .LBB20_3: # %endblock
|
||||
; X86-NEXT: .LBB22_3: # %endblock
|
||||
; X86-NEXT: popl %esi
|
||||
; X86-NEXT: retl
|
||||
;
|
||||
|
@ -834,14 +975,14 @@ define i32 @length12(i8* %X, i8* %Y) nounwind {
|
|||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB27_3
|
||||
; X86-NEXT: jne .LBB29_3
|
||||
; X86-NEXT: # %bb.1: # %loadbb1
|
||||
; X86-NEXT: movl 4(%esi), %ecx
|
||||
; X86-NEXT: movl 4(%eax), %edx
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB27_3
|
||||
; X86-NEXT: jne .LBB29_3
|
||||
; X86-NEXT: # %bb.2: # %loadbb2
|
||||
; X86-NEXT: movl 8(%esi), %ecx
|
||||
; X86-NEXT: movl 8(%eax), %edx
|
||||
|
@ -849,13 +990,13 @@ define i32 @length12(i8* %X, i8* %Y) nounwind {
|
|||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: je .LBB27_4
|
||||
; X86-NEXT: .LBB27_3: # %res_block
|
||||
; X86-NEXT: je .LBB29_4
|
||||
; X86-NEXT: .LBB29_3: # %res_block
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: setae %al
|
||||
; X86-NEXT: leal -1(%eax,%eax), %eax
|
||||
; X86-NEXT: .LBB27_4: # %endblock
|
||||
; X86-NEXT: .LBB29_4: # %endblock
|
||||
; X86-NEXT: popl %esi
|
||||
; X86-NEXT: retl
|
||||
;
|
||||
|
@ -866,7 +1007,7 @@ define i32 @length12(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB27_2
|
||||
; X64-NEXT: jne .LBB29_2
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movl 8(%rdi), %ecx
|
||||
; X64-NEXT: movl 8(%rsi), %edx
|
||||
|
@ -874,13 +1015,13 @@ define i32 @length12(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapl %edx
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: je .LBB27_3
|
||||
; X64-NEXT: .LBB27_2: # %res_block
|
||||
; X64-NEXT: je .LBB29_3
|
||||
; X64-NEXT: .LBB29_2: # %res_block
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: setae %al
|
||||
; X64-NEXT: leal -1(%rax,%rax), %eax
|
||||
; X64-NEXT: .LBB27_3: # %endblock
|
||||
; X64-NEXT: .LBB29_3: # %endblock
|
||||
; X64-NEXT: retq
|
||||
%m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 12) nounwind
|
||||
ret i32 %m
|
||||
|
@ -1006,21 +1147,21 @@ define i32 @length16(i8* %X, i8* %Y) nounwind {
|
|||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB31_4
|
||||
; X86-NEXT: jne .LBB33_4
|
||||
; X86-NEXT: # %bb.1: # %loadbb1
|
||||
; X86-NEXT: movl 4(%esi), %ecx
|
||||
; X86-NEXT: movl 4(%eax), %edx
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB31_4
|
||||
; X86-NEXT: jne .LBB33_4
|
||||
; X86-NEXT: # %bb.2: # %loadbb2
|
||||
; X86-NEXT: movl 8(%esi), %ecx
|
||||
; X86-NEXT: movl 8(%eax), %edx
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB31_4
|
||||
; X86-NEXT: jne .LBB33_4
|
||||
; X86-NEXT: # %bb.3: # %loadbb3
|
||||
; X86-NEXT: movl 12(%esi), %ecx
|
||||
; X86-NEXT: movl 12(%eax), %edx
|
||||
|
@ -1028,13 +1169,13 @@ define i32 @length16(i8* %X, i8* %Y) nounwind {
|
|||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: je .LBB31_5
|
||||
; X86-NEXT: .LBB31_4: # %res_block
|
||||
; X86-NEXT: je .LBB33_5
|
||||
; X86-NEXT: .LBB33_4: # %res_block
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: setae %al
|
||||
; X86-NEXT: leal -1(%eax,%eax), %eax
|
||||
; X86-NEXT: .LBB31_5: # %endblock
|
||||
; X86-NEXT: .LBB33_5: # %endblock
|
||||
; X86-NEXT: popl %esi
|
||||
; X86-NEXT: retl
|
||||
;
|
||||
|
@ -1045,7 +1186,7 @@ define i32 @length16(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB31_2
|
||||
; X64-NEXT: jne .LBB33_2
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rcx
|
||||
; X64-NEXT: movq 8(%rsi), %rdx
|
||||
|
@ -1053,13 +1194,13 @@ define i32 @length16(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: je .LBB31_3
|
||||
; X64-NEXT: .LBB31_2: # %res_block
|
||||
; X64-NEXT: je .LBB33_3
|
||||
; X64-NEXT: .LBB33_2: # %res_block
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: setae %al
|
||||
; X64-NEXT: leal -1(%rax,%rax), %eax
|
||||
; X64-NEXT: .LBB31_3: # %endblock
|
||||
; X64-NEXT: .LBB33_3: # %endblock
|
||||
; X64-NEXT: retq
|
||||
%m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 16) nounwind
|
||||
ret i32 %m
|
||||
|
@ -1181,21 +1322,21 @@ define i1 @length16_lt(i8* %x, i8* %y) nounwind {
|
|||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB33_4
|
||||
; X86-NEXT: jne .LBB35_4
|
||||
; X86-NEXT: # %bb.1: # %loadbb1
|
||||
; X86-NEXT: movl 4(%esi), %ecx
|
||||
; X86-NEXT: movl 4(%eax), %edx
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB33_4
|
||||
; X86-NEXT: jne .LBB35_4
|
||||
; X86-NEXT: # %bb.2: # %loadbb2
|
||||
; X86-NEXT: movl 8(%esi), %ecx
|
||||
; X86-NEXT: movl 8(%eax), %edx
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: jne .LBB33_4
|
||||
; X86-NEXT: jne .LBB35_4
|
||||
; X86-NEXT: # %bb.3: # %loadbb3
|
||||
; X86-NEXT: movl 12(%esi), %ecx
|
||||
; X86-NEXT: movl 12(%eax), %edx
|
||||
|
@ -1203,13 +1344,13 @@ define i1 @length16_lt(i8* %x, i8* %y) nounwind {
|
|||
; X86-NEXT: bswapl %edx
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: je .LBB33_5
|
||||
; X86-NEXT: .LBB33_4: # %res_block
|
||||
; X86-NEXT: je .LBB35_5
|
||||
; X86-NEXT: .LBB35_4: # %res_block
|
||||
; X86-NEXT: xorl %eax, %eax
|
||||
; X86-NEXT: cmpl %edx, %ecx
|
||||
; X86-NEXT: setae %al
|
||||
; X86-NEXT: leal -1(%eax,%eax), %eax
|
||||
; X86-NEXT: .LBB33_5: # %endblock
|
||||
; X86-NEXT: .LBB35_5: # %endblock
|
||||
; X86-NEXT: shrl $31, %eax
|
||||
; X86-NEXT: # kill: def $al killed $al killed $eax
|
||||
; X86-NEXT: popl %esi
|
||||
|
@ -1222,7 +1363,7 @@ define i1 @length16_lt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB33_2
|
||||
; X64-NEXT: jne .LBB35_2
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rcx
|
||||
; X64-NEXT: movq 8(%rsi), %rdx
|
||||
|
@ -1230,13 +1371,13 @@ define i1 @length16_lt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: je .LBB33_3
|
||||
; X64-NEXT: .LBB33_2: # %res_block
|
||||
; X64-NEXT: je .LBB35_3
|
||||
; X64-NEXT: .LBB35_2: # %res_block
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: setae %al
|
||||
; X64-NEXT: leal -1(%rax,%rax), %eax
|
||||
; X64-NEXT: .LBB33_3: # %endblock
|
||||
; X64-NEXT: .LBB35_3: # %endblock
|
||||
; X64-NEXT: shrl $31, %eax
|
||||
; X64-NEXT: # kill: def $al killed $al killed $eax
|
||||
; X64-NEXT: retq
|
||||
|
@ -1256,21 +1397,21 @@ define i1 @length16_gt(i8* %x, i8* %y) nounwind {
|
|||
; X86-NEXT: bswapl %eax
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: cmpl %ecx, %eax
|
||||
; X86-NEXT: jne .LBB34_4
|
||||
; X86-NEXT: jne .LBB36_4
|
||||
; X86-NEXT: # %bb.1: # %loadbb1
|
||||
; X86-NEXT: movl 4(%esi), %eax
|
||||
; X86-NEXT: movl 4(%edx), %ecx
|
||||
; X86-NEXT: bswapl %eax
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: cmpl %ecx, %eax
|
||||
; X86-NEXT: jne .LBB34_4
|
||||
; X86-NEXT: jne .LBB36_4
|
||||
; X86-NEXT: # %bb.2: # %loadbb2
|
||||
; X86-NEXT: movl 8(%esi), %eax
|
||||
; X86-NEXT: movl 8(%edx), %ecx
|
||||
; X86-NEXT: bswapl %eax
|
||||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: cmpl %ecx, %eax
|
||||
; X86-NEXT: jne .LBB34_4
|
||||
; X86-NEXT: jne .LBB36_4
|
||||
; X86-NEXT: # %bb.3: # %loadbb3
|
||||
; X86-NEXT: movl 12(%esi), %eax
|
||||
; X86-NEXT: movl 12(%edx), %ecx
|
||||
|
@ -1278,13 +1419,13 @@ define i1 @length16_gt(i8* %x, i8* %y) nounwind {
|
|||
; X86-NEXT: bswapl %ecx
|
||||
; X86-NEXT: xorl %edx, %edx
|
||||
; X86-NEXT: cmpl %ecx, %eax
|
||||
; X86-NEXT: je .LBB34_5
|
||||
; X86-NEXT: .LBB34_4: # %res_block
|
||||
; X86-NEXT: je .LBB36_5
|
||||
; X86-NEXT: .LBB36_4: # %res_block
|
||||
; X86-NEXT: xorl %edx, %edx
|
||||
; X86-NEXT: cmpl %ecx, %eax
|
||||
; X86-NEXT: setae %dl
|
||||
; X86-NEXT: leal -1(%edx,%edx), %edx
|
||||
; X86-NEXT: .LBB34_5: # %endblock
|
||||
; X86-NEXT: .LBB36_5: # %endblock
|
||||
; X86-NEXT: testl %edx, %edx
|
||||
; X86-NEXT: setg %al
|
||||
; X86-NEXT: popl %esi
|
||||
|
@ -1297,7 +1438,7 @@ define i1 @length16_gt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rax
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: jne .LBB34_2
|
||||
; X64-NEXT: jne .LBB36_2
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rax
|
||||
; X64-NEXT: movq 8(%rsi), %rcx
|
||||
|
@ -1305,13 +1446,13 @@ define i1 @length16_gt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: je .LBB34_3
|
||||
; X64-NEXT: .LBB34_2: # %res_block
|
||||
; X64-NEXT: je .LBB36_3
|
||||
; X64-NEXT: .LBB36_2: # %res_block
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: setae %dl
|
||||
; X64-NEXT: leal -1(%rdx,%rdx), %edx
|
||||
; X64-NEXT: .LBB34_3: # %endblock
|
||||
; X64-NEXT: .LBB36_3: # %endblock
|
||||
; X64-NEXT: testl %edx, %edx
|
||||
; X64-NEXT: setg %al
|
||||
; X64-NEXT: retq
|
||||
|
@ -1437,14 +1578,14 @@ define i32 @length24(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB36_3
|
||||
; X64-NEXT: jne .LBB38_3
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rcx
|
||||
; X64-NEXT: movq 8(%rsi), %rdx
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB36_3
|
||||
; X64-NEXT: jne .LBB38_3
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movq 16(%rdi), %rcx
|
||||
; X64-NEXT: movq 16(%rsi), %rdx
|
||||
|
@ -1452,13 +1593,13 @@ define i32 @length24(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: je .LBB36_4
|
||||
; X64-NEXT: .LBB36_3: # %res_block
|
||||
; X64-NEXT: je .LBB38_4
|
||||
; X64-NEXT: .LBB38_3: # %res_block
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: setae %al
|
||||
; X64-NEXT: leal -1(%rax,%rax), %eax
|
||||
; X64-NEXT: .LBB36_4: # %endblock
|
||||
; X64-NEXT: .LBB38_4: # %endblock
|
||||
; X64-NEXT: retq
|
||||
%m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 24) nounwind
|
||||
ret i32 %m
|
||||
|
@ -1596,14 +1737,14 @@ define i1 @length24_lt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB38_3
|
||||
; X64-NEXT: jne .LBB40_3
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rcx
|
||||
; X64-NEXT: movq 8(%rsi), %rdx
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB38_3
|
||||
; X64-NEXT: jne .LBB40_3
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movq 16(%rdi), %rcx
|
||||
; X64-NEXT: movq 16(%rsi), %rdx
|
||||
|
@ -1611,13 +1752,13 @@ define i1 @length24_lt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: je .LBB38_4
|
||||
; X64-NEXT: .LBB38_3: # %res_block
|
||||
; X64-NEXT: je .LBB40_4
|
||||
; X64-NEXT: .LBB40_3: # %res_block
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: setae %al
|
||||
; X64-NEXT: leal -1(%rax,%rax), %eax
|
||||
; X64-NEXT: .LBB38_4: # %endblock
|
||||
; X64-NEXT: .LBB40_4: # %endblock
|
||||
; X64-NEXT: shrl $31, %eax
|
||||
; X64-NEXT: # kill: def $al killed $al killed $eax
|
||||
; X64-NEXT: retq
|
||||
|
@ -1646,14 +1787,14 @@ define i1 @length24_gt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rax
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: jne .LBB39_3
|
||||
; X64-NEXT: jne .LBB41_3
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rax
|
||||
; X64-NEXT: movq 8(%rsi), %rcx
|
||||
; X64-NEXT: bswapq %rax
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: jne .LBB39_3
|
||||
; X64-NEXT: jne .LBB41_3
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movq 16(%rdi), %rax
|
||||
; X64-NEXT: movq 16(%rsi), %rcx
|
||||
|
@ -1661,13 +1802,13 @@ define i1 @length24_gt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: je .LBB39_4
|
||||
; X64-NEXT: .LBB39_3: # %res_block
|
||||
; X64-NEXT: je .LBB41_4
|
||||
; X64-NEXT: .LBB41_3: # %res_block
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: setae %dl
|
||||
; X64-NEXT: leal -1(%rdx,%rdx), %edx
|
||||
; X64-NEXT: .LBB39_4: # %endblock
|
||||
; X64-NEXT: .LBB41_4: # %endblock
|
||||
; X64-NEXT: testl %edx, %edx
|
||||
; X64-NEXT: setg %al
|
||||
; X64-NEXT: retq
|
||||
|
@ -2191,21 +2332,21 @@ define i32 @length32(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB47_4
|
||||
; X64-NEXT: jne .LBB49_4
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rcx
|
||||
; X64-NEXT: movq 8(%rsi), %rdx
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB47_4
|
||||
; X64-NEXT: jne .LBB49_4
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movq 16(%rdi), %rcx
|
||||
; X64-NEXT: movq 16(%rsi), %rdx
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB47_4
|
||||
; X64-NEXT: jne .LBB49_4
|
||||
; X64-NEXT: # %bb.3: # %loadbb3
|
||||
; X64-NEXT: movq 24(%rdi), %rcx
|
||||
; X64-NEXT: movq 24(%rsi), %rdx
|
||||
|
@ -2213,13 +2354,13 @@ define i32 @length32(i8* %X, i8* %Y) nounwind {
|
|||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: je .LBB47_5
|
||||
; X64-NEXT: .LBB47_4: # %res_block
|
||||
; X64-NEXT: je .LBB49_5
|
||||
; X64-NEXT: .LBB49_4: # %res_block
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: setae %al
|
||||
; X64-NEXT: leal -1(%rax,%rax), %eax
|
||||
; X64-NEXT: .LBB47_5: # %endblock
|
||||
; X64-NEXT: .LBB49_5: # %endblock
|
||||
; X64-NEXT: retq
|
||||
%m = tail call i32 @memcmp(i8* %X, i8* %Y, i64 32) nounwind
|
||||
ret i32 %m
|
||||
|
@ -2371,21 +2512,21 @@ define i1 @length32_lt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB49_4
|
||||
; X64-NEXT: jne .LBB51_4
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rcx
|
||||
; X64-NEXT: movq 8(%rsi), %rdx
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB49_4
|
||||
; X64-NEXT: jne .LBB51_4
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movq 16(%rdi), %rcx
|
||||
; X64-NEXT: movq 16(%rsi), %rdx
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: jne .LBB49_4
|
||||
; X64-NEXT: jne .LBB51_4
|
||||
; X64-NEXT: # %bb.3: # %loadbb3
|
||||
; X64-NEXT: movq 24(%rdi), %rcx
|
||||
; X64-NEXT: movq 24(%rsi), %rdx
|
||||
|
@ -2393,13 +2534,13 @@ define i1 @length32_lt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rdx
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: je .LBB49_5
|
||||
; X64-NEXT: .LBB49_4: # %res_block
|
||||
; X64-NEXT: je .LBB51_5
|
||||
; X64-NEXT: .LBB51_4: # %res_block
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: cmpq %rdx, %rcx
|
||||
; X64-NEXT: setae %al
|
||||
; X64-NEXT: leal -1(%rax,%rax), %eax
|
||||
; X64-NEXT: .LBB49_5: # %endblock
|
||||
; X64-NEXT: .LBB51_5: # %endblock
|
||||
; X64-NEXT: shrl $31, %eax
|
||||
; X64-NEXT: # kill: def $al killed $al killed $eax
|
||||
; X64-NEXT: retq
|
||||
|
@ -2428,21 +2569,21 @@ define i1 @length32_gt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rax
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: jne .LBB50_4
|
||||
; X64-NEXT: jne .LBB52_4
|
||||
; X64-NEXT: # %bb.1: # %loadbb1
|
||||
; X64-NEXT: movq 8(%rdi), %rax
|
||||
; X64-NEXT: movq 8(%rsi), %rcx
|
||||
; X64-NEXT: bswapq %rax
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: jne .LBB50_4
|
||||
; X64-NEXT: jne .LBB52_4
|
||||
; X64-NEXT: # %bb.2: # %loadbb2
|
||||
; X64-NEXT: movq 16(%rdi), %rax
|
||||
; X64-NEXT: movq 16(%rsi), %rcx
|
||||
; X64-NEXT: bswapq %rax
|
||||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: jne .LBB50_4
|
||||
; X64-NEXT: jne .LBB52_4
|
||||
; X64-NEXT: # %bb.3: # %loadbb3
|
||||
; X64-NEXT: movq 24(%rdi), %rax
|
||||
; X64-NEXT: movq 24(%rsi), %rcx
|
||||
|
@ -2450,13 +2591,13 @@ define i1 @length32_gt(i8* %x, i8* %y) nounwind {
|
|||
; X64-NEXT: bswapq %rcx
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: je .LBB50_5
|
||||
; X64-NEXT: .LBB50_4: # %res_block
|
||||
; X64-NEXT: je .LBB52_5
|
||||
; X64-NEXT: .LBB52_4: # %res_block
|
||||
; X64-NEXT: xorl %edx, %edx
|
||||
; X64-NEXT: cmpq %rcx, %rax
|
||||
; X64-NEXT: setae %dl
|
||||
; X64-NEXT: leal -1(%rdx,%rdx), %edx
|
||||
; X64-NEXT: .LBB50_5: # %endblock
|
||||
; X64-NEXT: .LBB52_5: # %endblock
|
||||
; X64-NEXT: testl %edx, %edx
|
||||
; X64-NEXT: setg %al
|
||||
; X64-NEXT: retq
|
||||
|
|
Loading…
Reference in New Issue