[llvm] 778440f - [X86] Add i128 funnel shift tests
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 16 09:31:43 PDT 2021
Author: Simon Pilgrim
Date: 2021-08-16T17:31:17+01:00
New Revision: 778440f1996f2a442fb691058b97bbb0a9cf7300
URL: https://github.com/llvm/llvm-project/commit/778440f1996f2a442fb691058b97bbb0a9cf7300
DIFF: https://github.com/llvm/llvm-project/commit/778440f1996f2a442fb691058b97bbb0a9cf7300.diff
LOG: [X86] Add i128 funnel shift tests
Test coverage for D108058
Added:
Modified:
llvm/test/CodeGen/X86/fshl.ll
llvm/test/CodeGen/X86/fshr.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/fshl.ll b/llvm/test/CodeGen/X86/fshl.ll
index 8b8312dde3d1..19c521d05bd6 100644
--- a/llvm/test/CodeGen/X86/fshl.ll
+++ b/llvm/test/CodeGen/X86/fshl.ll
@@ -8,6 +8,7 @@ declare i8 @llvm.fshl.i8(i8, i8, i8) nounwind readnone
declare i16 @llvm.fshl.i16(i16, i16, i16) nounwind readnone
declare i32 @llvm.fshl.i32(i32, i32, i32) nounwind readnone
declare i64 @llvm.fshl.i64(i64, i64, i64) nounwind readnone
+declare i128 @llvm.fshl.i128(i128, i128, i128) nounwind readnone
;
; Variable Funnel Shift
@@ -299,6 +300,601 @@ define i64 @var_shift_i64(i64 %x, i64 %y, i64 %z) nounwind {
ret i64 %tmp
}
+define i128 @var_shift_i128(i128 %x, i128 %y, i128 %z) nounwind {
+; X86-FAST-LABEL: var_shift_i128:
+; X86-FAST: # %bb.0:
+; X86-FAST-NEXT: pushl %ebp
+; X86-FAST-NEXT: pushl %ebx
+; X86-FAST-NEXT: pushl %edi
+; X86-FAST-NEXT: pushl %esi
+; X86-FAST-NEXT: subl $72, %esp
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edx
+; X86-FAST-NEXT: movl %edx, %edi
+; X86-FAST-NEXT: shldl $31, %eax, %edi
+; X86-FAST-NEXT: movl %ebx, %eax
+; X86-FAST-NEXT: notl %ebx
+; X86-FAST-NEXT: andl $127, %ebx
+; X86-FAST-NEXT: movb $64, %cl
+; X86-FAST-NEXT: subb %bl, %cl
+; X86-FAST-NEXT: shrl %edx
+; X86-FAST-NEXT: movl %edx, %ebp
+; X86-FAST-NEXT: shldl %cl, %edi, %edx
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %edi, %edx
+; X86-FAST-NEXT: shll %cl, %edx
+; X86-FAST-NEXT: testb $32, %cl
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X86-FAST-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: jne .LBB6_1
+; X86-FAST-NEXT: # %bb.2:
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: jmp .LBB6_3
+; X86-FAST-NEXT: .LBB6_1:
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_3:
+; X86-FAST-NEXT: andl $127, %eax
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movb %al, %ch
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: movb %ch, %cl
+; X86-FAST-NEXT: shldl %cl, %esi, %eax
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movb %bl, %cl
+; X86-FAST-NEXT: addb $-64, %cl
+; X86-FAST-NEXT: movl %edi, %eax
+; X86-FAST-NEXT: movl %ebp, %edx
+; X86-FAST-NEXT: shrdl %cl, %ebp, %eax
+; X86-FAST-NEXT: shrl %cl, %ebp
+; X86-FAST-NEXT: testb $32, %cl
+; X86-FAST-NEXT: jne .LBB6_4
+; X86-FAST-NEXT: # %bb.5:
+; X86-FAST-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: jmp .LBB6_6
+; X86-FAST-NEXT: .LBB6_4:
+; X86-FAST-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_6:
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-FAST-NEXT: movb %ch, %cl
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: shldl %cl, %eax, %ebp
+; X86-FAST-NEXT: shll %cl, %eax
+; X86-FAST-NEXT: shll %cl, %esi
+; X86-FAST-NEXT: testb $32, %ch
+; X86-FAST-NEXT: jne .LBB6_7
+; X86-FAST-NEXT: # %bb.8:
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: jmp .LBB6_9
+; X86-FAST-NEXT: .LBB6_7:
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %eax, %ebp
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_9:
+; X86-FAST-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-FAST-NEXT: jb .LBB6_11
+; X86-FAST-NEXT: # %bb.10:
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_11:
+; X86-FAST-NEXT: movb %bl, %cl
+; X86-FAST-NEXT: shrdl %cl, %edx, %edi
+; X86-FAST-NEXT: shrl %cl, %edx
+; X86-FAST-NEXT: shldl $31, %eax, %esi
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-FAST-NEXT: shrdl $1, %ebp, %eax
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: shrdl %cl, %esi, %eax
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %esi, %eax
+; X86-FAST-NEXT: shrl %cl, %eax
+; X86-FAST-NEXT: testb $32, %bl
+; X86-FAST-NEXT: je .LBB6_13
+; X86-FAST-NEXT: # %bb.12:
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %edx, %edi
+; X86-FAST-NEXT: xorl %eax, %eax
+; X86-FAST-NEXT: xorl %edx, %edx
+; X86-FAST-NEXT: .LBB6_13:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: jb .LBB6_15
+; X86-FAST-NEXT: # %bb.14:
+; X86-FAST-NEXT: xorl %ebp, %ebp
+; X86-FAST-NEXT: .LBB6_15:
+; X86-FAST-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movb $64, %cl
+; X86-FAST-NEXT: subb %ch, %cl
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-FAST-NEXT: shrl %cl, %ebp
+; X86-FAST-NEXT: movb %cl, {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Spill
+; X86-FAST-NEXT: testb $32, %cl
+; X86-FAST-NEXT: movl $0, %edx
+; X86-FAST-NEXT: jne .LBB6_17
+; X86-FAST-NEXT: # %bb.16:
+; X86-FAST-NEXT: movl %ebp, %edx
+; X86-FAST-NEXT: .LBB6_17:
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: addb $-64, %ch
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-FAST-NEXT: movl %edi, %esi
+; X86-FAST-NEXT: movb %ch, %cl
+; X86-FAST-NEXT: shll %cl, %esi
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edx
+; X86-FAST-NEXT: shldl %cl, %edi, %edx
+; X86-FAST-NEXT: testb $32, %ch
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: jne .LBB6_19
+; X86-FAST-NEXT: # %bb.18:
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_19:
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jb .LBB6_21
+; X86-FAST-NEXT: # %bb.20:
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_21:
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-FAST-NEXT: jae .LBB6_23
+; X86-FAST-NEXT: # %bb.22:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Folded Reload
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-FAST-NEXT: .LBB6_23:
+; X86-FAST-NEXT: testb $32, %ch
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: jne .LBB6_25
+; X86-FAST-NEXT: # %bb.24:
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_25:
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jb .LBB6_27
+; X86-FAST-NEXT: # %bb.26:
+; X86-FAST-NEXT: xorl %edx, %edx
+; X86-FAST-NEXT: .LBB6_27:
+; X86-FAST-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %cl # 1-byte Reload
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-FAST-NEXT: shrdl %cl, %esi, %edi
+; X86-FAST-NEXT: testb $32, %cl
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-FAST-NEXT: jne .LBB6_29
+; X86-FAST-NEXT: # %bb.28:
+; X86-FAST-NEXT: movl %edi, %ebp
+; X86-FAST-NEXT: .LBB6_29:
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-FAST-NEXT: jae .LBB6_31
+; X86-FAST-NEXT: # %bb.30:
+; X86-FAST-NEXT: orl %ebp, %esi
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_31:
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jae .LBB6_33
+; X86-FAST-NEXT: # %bb.32:
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
+; X86-FAST-NEXT: movl %eax, %ebp
+; X86-FAST-NEXT: .LBB6_33:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jae .LBB6_35
+; X86-FAST-NEXT: # %bb.34:
+; X86-FAST-NEXT: movl %edx, %ecx
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-FAST-NEXT: orl %eax, %edx
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %ecx, %edx
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-FAST-NEXT: .LBB6_35:
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: testl %ebx, %ebx
+; X86-FAST-NEXT: je .LBB6_37
+; X86-FAST-NEXT: # %bb.36:
+; X86-FAST-NEXT: movl %ebp, %ecx
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
+; X86-FAST-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_37:
+; X86-FAST-NEXT: orl %ecx, %edi
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Folded Reload
+; X86-FAST-NEXT: cmpl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: je .LBB6_39
+; X86-FAST-NEXT: # %bb.38:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-FAST-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-FAST-NEXT: .LBB6_39:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
+; X86-FAST-NEXT: orl %edx, %esi
+; X86-FAST-NEXT: movl %ecx, 12(%eax)
+; X86-FAST-NEXT: movl %esi, 8(%eax)
+; X86-FAST-NEXT: movl %edi, 4(%eax)
+; X86-FAST-NEXT: movl %ebx, (%eax)
+; X86-FAST-NEXT: addl $72, %esp
+; X86-FAST-NEXT: popl %esi
+; X86-FAST-NEXT: popl %edi
+; X86-FAST-NEXT: popl %ebx
+; X86-FAST-NEXT: popl %ebp
+; X86-FAST-NEXT: retl $4
+;
+; X86-SLOW-LABEL: var_shift_i128:
+; X86-SLOW: # %bb.0:
+; X86-SLOW-NEXT: pushl %ebp
+; X86-SLOW-NEXT: pushl %ebx
+; X86-SLOW-NEXT: pushl %edi
+; X86-SLOW-NEXT: pushl %esi
+; X86-SLOW-NEXT: subl $76, %esp
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edx
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: andl $127, %eax
+; X86-SLOW-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: # kill: def $al killed $al killed $eax
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: shll %cl, %edx
+; X86-SLOW-NEXT: movl %ebx, %esi
+; X86-SLOW-NEXT: shrl %esi
+; X86-SLOW-NEXT: movb %al, %ah
+; X86-SLOW-NEXT: notb %ah
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movb %ah, %cl
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: movl %esi, (%esp) # 4-byte Spill
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: shll %cl, %ebp
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: shrl %edi
+; X86-SLOW-NEXT: movb %ah, %cl
+; X86-SLOW-NEXT: shrl %cl, %edi
+; X86-SLOW-NEXT: movl %ebx, %esi
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; X86-SLOW-NEXT: shll %cl, %ebx
+; X86-SLOW-NEXT: movb %al, {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Spill
+; X86-SLOW-NEXT: testb $32, %al
+; X86-SLOW-NEXT: jne .LBB6_1
+; X86-SLOW-NEXT: # %bb.2:
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: orl (%esp), %edx # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl %edx, (%esp) # 4-byte Spill
+; X86-SLOW-NEXT: orl %edi, %ebp
+; X86-SLOW-NEXT: jmp .LBB6_3
+; X86-SLOW-NEXT: .LBB6_1:
+; X86-SLOW-NEXT: movl %ebx, %ebp
+; X86-SLOW-NEXT: movl %esi, (%esp) # 4-byte Spill
+; X86-SLOW-NEXT: xorl %ebx, %ebx
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_3:
+; X86-SLOW-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; X86-SLOW-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %dl # 1-byte Reload
+; X86-SLOW-NEXT: jb .LBB6_5
+; X86-SLOW-NEXT: # %bb.4:
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_5:
+; X86-SLOW-NEXT: shrl %edi
+; X86-SLOW-NEXT: notl %ebx
+; X86-SLOW-NEXT: andl $127, %ebx
+; X86-SLOW-NEXT: movl %edi, %ebp
+; X86-SLOW-NEXT: movl %ebx, %ecx
+; X86-SLOW-NEXT: shrl %cl, %ebp
+; X86-SLOW-NEXT: movl %esi, %ecx
+; X86-SLOW-NEXT: shrl %ecx
+; X86-SLOW-NEXT: movl %eax, %esi
+; X86-SLOW-NEXT: shll $31, %esi
+; X86-SLOW-NEXT: orl %ecx, %esi
+; X86-SLOW-NEXT: movl %esi, %ecx
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ebx, %ecx
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: testb $32, %bl
+; X86-SLOW-NEXT: movl $0, %esi
+; X86-SLOW-NEXT: movl $0, %ecx
+; X86-SLOW-NEXT: jne .LBB6_7
+; X86-SLOW-NEXT: # %bb.6:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: movl %ebp, %ecx
+; X86-SLOW-NEXT: .LBB6_7:
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: shrl %eax
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: shll $31, %esi
+; X86-SLOW-NEXT: orl %eax, %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ebx, %ecx
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: addl %edi, %edi
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movb %cl, {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Spill
+; X86-SLOW-NEXT: shll %cl, %edi
+; X86-SLOW-NEXT: testb $32, %bl
+; X86-SLOW-NEXT: jne .LBB6_9
+; X86-SLOW-NEXT: # %bb.8:
+; X86-SLOW-NEXT: orl %esi, %edi
+; X86-SLOW-NEXT: movl %edi, %ebp
+; X86-SLOW-NEXT: .LBB6_9:
+; X86-SLOW-NEXT: movb %bl, %dh
+; X86-SLOW-NEXT: addb $-64, %dh
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: movb %dh, %cl
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: testb $32, %dh
+; X86-SLOW-NEXT: movl $0, %ecx
+; X86-SLOW-NEXT: movl (%esp), %eax # 4-byte Reload
+; X86-SLOW-NEXT: jne .LBB6_11
+; X86-SLOW-NEXT: # %bb.10:
+; X86-SLOW-NEXT: movl %esi, %ecx
+; X86-SLOW-NEXT: .LBB6_11:
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-SLOW-NEXT: jb .LBB6_13
+; X86-SLOW-NEXT: # %bb.12:
+; X86-SLOW-NEXT: xorl %eax, %eax
+; X86-SLOW-NEXT: .LBB6_13:
+; X86-SLOW-NEXT: movl %eax, (%esp) # 4-byte Spill
+; X86-SLOW-NEXT: movb $64, %ch
+; X86-SLOW-NEXT: movb $64, %ah
+; X86-SLOW-NEXT: subb %dl, %ah
+; X86-SLOW-NEXT: movb %ah, %cl
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: leal (%ebp,%ebp), %edi
+; X86-SLOW-NEXT: shll %cl, %edi
+; X86-SLOW-NEXT: movb %ah, %cl
+; X86-SLOW-NEXT: shrl %cl, %ebp
+; X86-SLOW-NEXT: testb $32, %ah
+; X86-SLOW-NEXT: jne .LBB6_14
+; X86-SLOW-NEXT: # %bb.15:
+; X86-SLOW-NEXT: orl %esi, %edi
+; X86-SLOW-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %edi, %ebp
+; X86-SLOW-NEXT: jmp .LBB6_16
+; X86-SLOW-NEXT: .LBB6_14:
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_16:
+; X86-SLOW-NEXT: addb $-64, %dl
+; X86-SLOW-NEXT: movb %dl, %cl
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: shll %cl, %edi
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-SLOW-NEXT: shrl %cl, %eax
+; X86-SLOW-NEXT: movb %dl, %cl
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: testb $32, %dl
+; X86-SLOW-NEXT: jne .LBB6_17
+; X86-SLOW-NEXT: # %bb.18:
+; X86-SLOW-NEXT: orl %eax, %edi
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jae .LBB6_20
+; X86-SLOW-NEXT: jmp .LBB6_21
+; X86-SLOW-NEXT: .LBB6_17:
+; X86-SLOW-NEXT: movl %esi, %edi
+; X86-SLOW-NEXT: xorl %esi, %esi
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jb .LBB6_21
+; X86-SLOW-NEXT: .LBB6_20:
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_21:
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: jae .LBB6_23
+; X86-SLOW-NEXT: # %bb.22:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: orl %ebp, %esi
+; X86-SLOW-NEXT: .LBB6_23:
+; X86-SLOW-NEXT: movl (%esp), %ebp # 4-byte Reload
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: jae .LBB6_25
+; X86-SLOW-NEXT: # %bb.24:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_25:
+; X86-SLOW-NEXT: shrl %edi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: shll $31, %esi
+; X86-SLOW-NEXT: orl %edi, %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movb %bl, %cl
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: addl %edi, %edi
+; X86-SLOW-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %cl # 1-byte Reload
+; X86-SLOW-NEXT: shll %cl, %edi
+; X86-SLOW-NEXT: testb $32, %bl
+; X86-SLOW-NEXT: jne .LBB6_27
+; X86-SLOW-NEXT: # %bb.26:
+; X86-SLOW-NEXT: orl %esi, %edi
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_27:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: movl %edi, %eax
+; X86-SLOW-NEXT: movb %dh, %cl
+; X86-SLOW-NEXT: shrl %cl, %eax
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: testb $32, %dh
+; X86-SLOW-NEXT: jne .LBB6_29
+; X86-SLOW-NEXT: # %bb.28:
+; X86-SLOW-NEXT: orl %eax, %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_29:
+; X86-SLOW-NEXT: subb %bl, %ch
+; X86-SLOW-NEXT: movl %edi, %eax
+; X86-SLOW-NEXT: movb %ch, %cl
+; X86-SLOW-NEXT: shll %cl, %eax
+; X86-SLOW-NEXT: shrl %edi
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: shrl %cl, %edi
+; X86-SLOW-NEXT: movb %ch, %cl
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-SLOW-NEXT: shll %cl, %edx
+; X86-SLOW-NEXT: testb $32, %ch
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: movl %edi, %ecx
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: jne .LBB6_30
+; X86-SLOW-NEXT: # %bb.31:
+; X86-SLOW-NEXT: orl %ecx, %edx
+; X86-SLOW-NEXT: movl %edx, %ecx
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jb .LBB6_33
+; X86-SLOW-NEXT: jmp .LBB6_34
+; X86-SLOW-NEXT: .LBB6_30:
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: xorl %eax, %eax
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jae .LBB6_34
+; X86-SLOW-NEXT: .LBB6_33:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-SLOW-NEXT: orl %eax, %edx
+; X86-SLOW-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_34:
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jb .LBB6_35
+; X86-SLOW-NEXT: # %bb.36:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-SLOW-NEXT: jmp .LBB6_37
+; X86-SLOW-NEXT: .LBB6_35:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-SLOW-NEXT: orl %ecx, %eax
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: .LBB6_37:
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: testl %ebx, %ebx
+; X86-SLOW-NEXT: je .LBB6_39
+; X86-SLOW-NEXT: # %bb.38:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-SLOW-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ecx, %ebx
+; X86-SLOW-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_39:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Folded Reload
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
+; X86-SLOW-NEXT: cmpl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: je .LBB6_41
+; X86-SLOW-NEXT: # %bb.40:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: .LBB6_41:
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl %esi, 12(%eax)
+; X86-SLOW-NEXT: movl %edi, 8(%eax)
+; X86-SLOW-NEXT: movl %ebx, (%eax)
+; X86-SLOW-NEXT: movl %ebp, 4(%eax)
+; X86-SLOW-NEXT: addl $76, %esp
+; X86-SLOW-NEXT: popl %esi
+; X86-SLOW-NEXT: popl %edi
+; X86-SLOW-NEXT: popl %ebx
+; X86-SLOW-NEXT: popl %ebp
+; X86-SLOW-NEXT: retl $4
+;
+; X64-FAST-LABEL: var_shift_i128:
+; X64-FAST: # %bb.0:
+; X64-FAST-NEXT: movq %r8, %r9
+; X64-FAST-NEXT: movq %rcx, %r10
+; X64-FAST-NEXT: movq %rdx, %r8
+; X64-FAST-NEXT: movq %rsi, %rdx
+; X64-FAST-NEXT: movl %r9d, %ecx
+; X64-FAST-NEXT: shldq %cl, %rdi, %rdx
+; X64-FAST-NEXT: shrdq $1, %r10, %r8
+; X64-FAST-NEXT: shrq %r10
+; X64-FAST-NEXT: notb %cl
+; X64-FAST-NEXT: shrdq %cl, %r10, %r8
+; X64-FAST-NEXT: shrq %cl, %r10
+; X64-FAST-NEXT: xorl %eax, %eax
+; X64-FAST-NEXT: testb $64, %cl
+; X64-FAST-NEXT: cmovneq %r10, %r8
+; X64-FAST-NEXT: cmovneq %rax, %r10
+; X64-FAST-NEXT: movl %r9d, %ecx
+; X64-FAST-NEXT: shlq %cl, %rdi
+; X64-FAST-NEXT: testb $64, %r9b
+; X64-FAST-NEXT: cmovneq %rdi, %rdx
+; X64-FAST-NEXT: cmoveq %rdi, %rax
+; X64-FAST-NEXT: orq %r8, %rax
+; X64-FAST-NEXT: orq %r10, %rdx
+; X64-FAST-NEXT: retq
+;
+; X64-SLOW-LABEL: var_shift_i128:
+; X64-SLOW: # %bb.0:
+; X64-SLOW-NEXT: movq %rcx, %r11
+; X64-SLOW-NEXT: movq %rdx, %r9
+; X64-SLOW-NEXT: movl %r8d, %ecx
+; X64-SLOW-NEXT: shlq %cl, %rsi
+; X64-SLOW-NEXT: movq %rdi, %rdx
+; X64-SLOW-NEXT: shrq %rdx
+; X64-SLOW-NEXT: movl %r8d, %r10d
+; X64-SLOW-NEXT: notb %r10b
+; X64-SLOW-NEXT: movl %r10d, %ecx
+; X64-SLOW-NEXT: shrq %cl, %rdx
+; X64-SLOW-NEXT: orq %rsi, %rdx
+; X64-SLOW-NEXT: shrq %r9
+; X64-SLOW-NEXT: movq %r11, %rax
+; X64-SLOW-NEXT: shlq $63, %rax
+; X64-SLOW-NEXT: orq %r9, %rax
+; X64-SLOW-NEXT: shrq %cl, %rax
+; X64-SLOW-NEXT: shrq %r11
+; X64-SLOW-NEXT: leaq (%r11,%r11), %rsi
+; X64-SLOW-NEXT: movl %r8d, %ecx
+; X64-SLOW-NEXT: shlq %cl, %rsi
+; X64-SLOW-NEXT: orq %rax, %rsi
+; X64-SLOW-NEXT: movl %r10d, %ecx
+; X64-SLOW-NEXT: shrq %cl, %r11
+; X64-SLOW-NEXT: xorl %eax, %eax
+; X64-SLOW-NEXT: testb $64, %r10b
+; X64-SLOW-NEXT: cmovneq %r11, %rsi
+; X64-SLOW-NEXT: cmovneq %rax, %r11
+; X64-SLOW-NEXT: movl %r8d, %ecx
+; X64-SLOW-NEXT: shlq %cl, %rdi
+; X64-SLOW-NEXT: testb $64, %r8b
+; X64-SLOW-NEXT: cmovneq %rdi, %rdx
+; X64-SLOW-NEXT: cmoveq %rdi, %rax
+; X64-SLOW-NEXT: orq %rsi, %rax
+; X64-SLOW-NEXT: orq %r11, %rdx
+; X64-SLOW-NEXT: retq
+ %tmp = tail call i128 @llvm.fshl.i128(i128 %x, i128 %y, i128 %z)
+ ret i128 %tmp
+}
+
;
; Const Funnel Shift
;
diff --git a/llvm/test/CodeGen/X86/fshr.ll b/llvm/test/CodeGen/X86/fshr.ll
index 5decfb6f35e6..243c02328ead 100644
--- a/llvm/test/CodeGen/X86/fshr.ll
+++ b/llvm/test/CodeGen/X86/fshr.ll
@@ -8,6 +8,7 @@ declare i8 @llvm.fshr.i8(i8, i8, i8) nounwind readnone
declare i16 @llvm.fshr.i16(i16, i16, i16) nounwind readnone
declare i32 @llvm.fshr.i32(i32, i32, i32) nounwind readnone
declare i64 @llvm.fshr.i64(i64, i64, i64) nounwind readnone
+declare i128 @llvm.fshr.i128(i128, i128, i128) nounwind readnone
;
; Variable Funnel Shift
@@ -299,6 +300,610 @@ define i64 @var_shift_i64(i64 %x, i64 %y, i64 %z) nounwind {
ret i64 %tmp
}
+define i128 @var_shift_i128(i128 %x, i128 %y, i128 %z) nounwind {
+; X86-FAST-LABEL: var_shift_i128:
+; X86-FAST: # %bb.0:
+; X86-FAST-NEXT: pushl %ebp
+; X86-FAST-NEXT: pushl %ebx
+; X86-FAST-NEXT: pushl %edi
+; X86-FAST-NEXT: pushl %esi
+; X86-FAST-NEXT: subl $76, %esp
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; X86-FAST-NEXT: movl %ebx, %ecx
+; X86-FAST-NEXT: andl $127, %ecx
+; X86-FAST-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movb %cl, %ch
+; X86-FAST-NEXT: movb $64, %cl
+; X86-FAST-NEXT: subb %ch, %cl
+; X86-FAST-NEXT: shll %cl, %edi
+; X86-FAST-NEXT: movb %cl, (%esp) # 1-byte Spill
+; X86-FAST-NEXT: testb $32, %cl
+; X86-FAST-NEXT: movl $0, %esi
+; X86-FAST-NEXT: jne .LBB6_2
+; X86-FAST-NEXT: # %bb.1:
+; X86-FAST-NEXT: movl %edi, %esi
+; X86-FAST-NEXT: .LBB6_2:
+; X86-FAST-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-FAST-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %eax, %edi
+; X86-FAST-NEXT: movl %ebp, %eax
+; X86-FAST-NEXT: shldl $1, %ebp, %edi
+; X86-FAST-NEXT: addl %ebp, %eax
+; X86-FAST-NEXT: notl %ebx
+; X86-FAST-NEXT: andl $127, %ebx
+; X86-FAST-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movb %bl, %cl
+; X86-FAST-NEXT: shldl %cl, %eax, %edi
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: shll %cl, %eax
+; X86-FAST-NEXT: testb $32, %bl
+; X86-FAST-NEXT: movl %eax, %esi
+; X86-FAST-NEXT: jne .LBB6_4
+; X86-FAST-NEXT: # %bb.3:
+; X86-FAST-NEXT: movl %edi, %esi
+; X86-FAST-NEXT: .LBB6_4:
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-FAST-NEXT: movb %ch, %cl
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-FAST-NEXT: shrdl %cl, %edi, %esi
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %edi, %esi
+; X86-FAST-NEXT: shrl %cl, %esi
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-FAST-NEXT: shrl %cl, %edi
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edx
+; X86-FAST-NEXT: shrdl %cl, %edx, %ebp
+; X86-FAST-NEXT: testb $32, %ch
+; X86-FAST-NEXT: jne .LBB6_5
+; X86-FAST-NEXT: # %bb.6:
+; X86-FAST-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: jmp .LBB6_7
+; X86-FAST-NEXT: .LBB6_5:
+; X86-FAST-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: xorl %edi, %edi
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_7:
+; X86-FAST-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: testb $32, %bl
+; X86-FAST-NEXT: movl $0, %esi
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-FAST-NEXT: jne .LBB6_9
+; X86-FAST-NEXT: # %bb.8:
+; X86-FAST-NEXT: movl %eax, %esi
+; X86-FAST-NEXT: .LBB6_9:
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: jb .LBB6_11
+; X86-FAST-NEXT: # %bb.10:
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_11:
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: shrdl $31, %edi, %eax
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movb %bl, %cl
+; X86-FAST-NEXT: shll %cl, %eax
+; X86-FAST-NEXT: testb $32, %bl
+; X86-FAST-NEXT: movl $0, %edi
+; X86-FAST-NEXT: jne .LBB6_13
+; X86-FAST-NEXT: # %bb.12:
+; X86-FAST-NEXT: movl %eax, %edi
+; X86-FAST-NEXT: .LBB6_13:
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: movb (%esp), %cl # 1-byte Reload
+; X86-FAST-NEXT: shldl %cl, %ebp, %eax
+; X86-FAST-NEXT: testb $32, %cl
+; X86-FAST-NEXT: jne .LBB6_15
+; X86-FAST-NEXT: # %bb.14:
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_15:
+; X86-FAST-NEXT: movb %bl, %dh
+; X86-FAST-NEXT: addb $-64, %dh
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: movb %dh, %cl
+; X86-FAST-NEXT: shll %cl, %eax
+; X86-FAST-NEXT: movl %eax, (%esp) # 4-byte Spill
+; X86-FAST-NEXT: testb $32, %dh
+; X86-FAST-NEXT: movl $0, %eax
+; X86-FAST-NEXT: jne .LBB6_17
+; X86-FAST-NEXT: # %bb.16:
+; X86-FAST-NEXT: movl (%esp), %eax # 4-byte Reload
+; X86-FAST-NEXT: .LBB6_17:
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: jb .LBB6_19
+; X86-FAST-NEXT: # %bb.18:
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_19:
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jb .LBB6_21
+; X86-FAST-NEXT: # %bb.20:
+; X86-FAST-NEXT: xorl %esi, %esi
+; X86-FAST-NEXT: .LBB6_21:
+; X86-FAST-NEXT: addb $-64, %ch
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: movb %ch, %cl
+; X86-FAST-NEXT: shrl %cl, %eax
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: testb $32, %ch
+; X86-FAST-NEXT: movl $0, %eax
+; X86-FAST-NEXT: jne .LBB6_23
+; X86-FAST-NEXT: # %bb.22:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: .LBB6_23:
+; X86-FAST-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: jae .LBB6_25
+; X86-FAST-NEXT: # %bb.24:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
+; X86-FAST-NEXT: .LBB6_25:
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-FAST-NEXT: movb %ch, %cl
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: shrdl %cl, %eax, %ebp
+; X86-FAST-NEXT: testb $32, %ch
+; X86-FAST-NEXT: jne .LBB6_27
+; X86-FAST-NEXT: # %bb.26:
+; X86-FAST-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_27:
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jb .LBB6_29
+; X86-FAST-NEXT: # %bb.28:
+; X86-FAST-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-FAST-NEXT: .LBB6_29:
+; X86-FAST-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-FAST-NEXT: jae .LBB6_31
+; X86-FAST-NEXT: # %bb.30:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Folded Reload
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_31:
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: shldl $1, %eax, %ebp
+; X86-FAST-NEXT: movl %ebp, %eax
+; X86-FAST-NEXT: movl %ebx, %ecx
+; X86-FAST-NEXT: shldl %cl, %edi, %eax
+; X86-FAST-NEXT: testb $32, %bl
+; X86-FAST-NEXT: jne .LBB6_33
+; X86-FAST-NEXT: # %bb.32:
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_33:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: movb %dh, %cl
+; X86-FAST-NEXT: shldl %cl, %esi, %eax
+; X86-FAST-NEXT: testb $32, %dh
+; X86-FAST-NEXT: jne .LBB6_35
+; X86-FAST-NEXT: # %bb.34:
+; X86-FAST-NEXT: movl %eax, (%esp) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_35:
+; X86-FAST-NEXT: movb $64, %cl
+; X86-FAST-NEXT: subb %bl, %cl
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: shrdl %cl, %eax, %esi
+; X86-FAST-NEXT: shrl %cl, %eax
+; X86-FAST-NEXT: testb $32, %cl
+; X86-FAST-NEXT: je .LBB6_37
+; X86-FAST-NEXT: # %bb.36:
+; X86-FAST-NEXT: movl %eax, %esi
+; X86-FAST-NEXT: xorl %eax, %eax
+; X86-FAST-NEXT: .LBB6_37:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jae .LBB6_39
+; X86-FAST-NEXT: # %bb.38:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-FAST-NEXT: orl %eax, %ecx
+; X86-FAST-NEXT: movl %ecx, (%esp) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_39:
+; X86-FAST-NEXT: cmpl $64, %ebx
+; X86-FAST-NEXT: jae .LBB6_41
+; X86-FAST-NEXT: # %bb.40:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-FAST-NEXT: orl %esi, %eax
+; X86-FAST-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_41:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-FAST-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-FAST-NEXT: testl %ebx, %ebx
+; X86-FAST-NEXT: je .LBB6_43
+; X86-FAST-NEXT: # %bb.42:
+; X86-FAST-NEXT: movl (%esp), %ebp # 4-byte Reload
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-FAST-NEXT: .LBB6_43:
+; X86-FAST-NEXT: orl %edx, %ebp
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload
+; X86-FAST-NEXT: cmpl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-FAST-NEXT: je .LBB6_45
+; X86-FAST-NEXT: # %bb.44:
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-FAST-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-FAST-NEXT: .LBB6_45:
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload
+; X86-FAST-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
+; X86-FAST-NEXT: movl %ecx, 4(%eax)
+; X86-FAST-NEXT: movl %esi, (%eax)
+; X86-FAST-NEXT: movl %ebp, 12(%eax)
+; X86-FAST-NEXT: movl %edi, 8(%eax)
+; X86-FAST-NEXT: addl $76, %esp
+; X86-FAST-NEXT: popl %esi
+; X86-FAST-NEXT: popl %edi
+; X86-FAST-NEXT: popl %ebx
+; X86-FAST-NEXT: popl %ebp
+; X86-FAST-NEXT: retl $4
+;
+; X86-SLOW-LABEL: var_shift_i128:
+; X86-SLOW: # %bb.0:
+; X86-SLOW-NEXT: pushl %ebp
+; X86-SLOW-NEXT: pushl %ebx
+; X86-SLOW-NEXT: pushl %edi
+; X86-SLOW-NEXT: pushl %esi
+; X86-SLOW-NEXT: subl $72, %esp
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: andl $127, %eax
+; X86-SLOW-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %eax, %edx
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: leal (%edi,%edi), %ebp
+; X86-SLOW-NEXT: notb %al
+; X86-SLOW-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: shll %cl, %ebp
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: movl %edx, %ecx
+; X86-SLOW-NEXT: shrl %cl, %edi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: leal (%esi,%esi), %ebx
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: shll %cl, %ebx
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: movl %edx, %ecx
+; X86-SLOW-NEXT: shrl %cl, %eax
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: testb $32, %dl
+; X86-SLOW-NEXT: jne .LBB6_1
+; X86-SLOW-NEXT: # %bb.2:
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload
+; X86-SLOW-NEXT: orl %edi, %ebx
+; X86-SLOW-NEXT: movl %ebx, %esi
+; X86-SLOW-NEXT: jmp .LBB6_3
+; X86-SLOW-NEXT: .LBB6_1:
+; X86-SLOW-NEXT: movl %eax, %ebp
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_3:
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: jb .LBB6_5
+; X86-SLOW-NEXT: # %bb.4:
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_5:
+; X86-SLOW-NEXT: leal (%ecx,%ecx), %esi
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebx
+; X86-SLOW-NEXT: notl %ebx
+; X86-SLOW-NEXT: andl $127, %ebx
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ebx, %ecx
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: movl %eax, %ecx
+; X86-SLOW-NEXT: shrl $31, %ecx
+; X86-SLOW-NEXT: leal (%ecx,%edi,2), %ecx
+; X86-SLOW-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ecx, %edi
+; X86-SLOW-NEXT: movl %ebx, %ecx
+; X86-SLOW-NEXT: shll %cl, %edi
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: testb $32, %bl
+; X86-SLOW-NEXT: movl $0, %edi
+; X86-SLOW-NEXT: movl $0, %ecx
+; X86-SLOW-NEXT: jne .LBB6_7
+; X86-SLOW-NEXT: # %bb.6:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: movl %esi, %ecx
+; X86-SLOW-NEXT: .LBB6_7:
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: movl %edi, %ecx
+; X86-SLOW-NEXT: shrl $31, %ecx
+; X86-SLOW-NEXT: leal (%ecx,%eax,2), %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ebx, %ecx
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: andl $2147483647, %edi # imm = 0x7FFFFFFF
+; X86-SLOW-NEXT: movl %ebx, %ecx
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movb %cl, {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Spill
+; X86-SLOW-NEXT: shrl %cl, %edi
+; X86-SLOW-NEXT: testb $32, %bl
+; X86-SLOW-NEXT: jne .LBB6_9
+; X86-SLOW-NEXT: # %bb.8:
+; X86-SLOW-NEXT: orl %edi, %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_9:
+; X86-SLOW-NEXT: movb %bl, %dh
+; X86-SLOW-NEXT: addb $-64, %dh
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: movb %dh, %cl
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: testb $32, %dh
+; X86-SLOW-NEXT: movl $0, %ecx
+; X86-SLOW-NEXT: jne .LBB6_11
+; X86-SLOW-NEXT: # %bb.10:
+; X86-SLOW-NEXT: movl %esi, %ecx
+; X86-SLOW-NEXT: .LBB6_11:
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: jb .LBB6_13
+; X86-SLOW-NEXT: # %bb.12:
+; X86-SLOW-NEXT: xorl %ebp, %ebp
+; X86-SLOW-NEXT: .LBB6_13:
+; X86-SLOW-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movb $64, %ch
+; X86-SLOW-NEXT: movb $64, %ah
+; X86-SLOW-NEXT: subb %dl, %ah
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-SLOW-NEXT: movb %ah, %cl
+; X86-SLOW-NEXT: shll %cl, %ebp
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: movl %esi, %edi
+; X86-SLOW-NEXT: shrl %edi
+; X86-SLOW-NEXT: shrl %cl, %edi
+; X86-SLOW-NEXT: movb %ah, %cl
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: testb $32, %ah
+; X86-SLOW-NEXT: jne .LBB6_14
+; X86-SLOW-NEXT: # %bb.15:
+; X86-SLOW-NEXT: orl %edi, %ebp
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %ebp, %esi
+; X86-SLOW-NEXT: jmp .LBB6_16
+; X86-SLOW-NEXT: .LBB6_14:
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_16:
+; X86-SLOW-NEXT: addb $-64, %dl
+; X86-SLOW-NEXT: movb %dl, %cl
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: shrl %cl, %eax
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
+; X86-SLOW-NEXT: shll %cl, %ebp
+; X86-SLOW-NEXT: movb %dl, %cl
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %edi
+; X86-SLOW-NEXT: shrl %cl, %edi
+; X86-SLOW-NEXT: testb $32, %dl
+; X86-SLOW-NEXT: jne .LBB6_17
+; X86-SLOW-NEXT: # %bb.18:
+; X86-SLOW-NEXT: orl %eax, %ebp
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jae .LBB6_20
+; X86-SLOW-NEXT: jmp .LBB6_21
+; X86-SLOW-NEXT: .LBB6_17:
+; X86-SLOW-NEXT: movl %edi, %ebp
+; X86-SLOW-NEXT: xorl %edi, %edi
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jb .LBB6_21
+; X86-SLOW-NEXT: .LBB6_20:
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: movl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill
+; X86-SLOW-NEXT: .LBB6_21:
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: jae .LBB6_23
+; X86-SLOW-NEXT: # %bb.22:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: orl %esi, %edi
+; X86-SLOW-NEXT: .LBB6_23:
+; X86-SLOW-NEXT: cmpl $64, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %esi
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: jb .LBB6_24
+; X86-SLOW-NEXT: # %bb.25:
+; X86-SLOW-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: jmp .LBB6_26
+; X86-SLOW-NEXT: .LBB6_24:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_26:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: shrl $31, %eax
+; X86-SLOW-NEXT: leal (%eax,%esi,2), %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movb %bl, %cl
+; X86-SLOW-NEXT: shll %cl, %esi
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: shrl %edi
+; X86-SLOW-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %cl # 1-byte Reload
+; X86-SLOW-NEXT: shrl %cl, %edi
+; X86-SLOW-NEXT: testb $32, %bl
+; X86-SLOW-NEXT: jne .LBB6_28
+; X86-SLOW-NEXT: # %bb.27:
+; X86-SLOW-NEXT: orl %edi, %esi
+; X86-SLOW-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_28:
+; X86-SLOW-NEXT: movl %ebp, %eax
+; X86-SLOW-NEXT: movb %dh, %cl
+; X86-SLOW-NEXT: shll %cl, %eax
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: shrl %cl, %esi
+; X86-SLOW-NEXT: testb $32, %dh
+; X86-SLOW-NEXT: jne .LBB6_30
+; X86-SLOW-NEXT: # %bb.29:
+; X86-SLOW-NEXT: orl %esi, %eax
+; X86-SLOW-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_30:
+; X86-SLOW-NEXT: subb %bl, %ch
+; X86-SLOW-NEXT: movl %ebp, %eax
+; X86-SLOW-NEXT: movb %ch, %cl
+; X86-SLOW-NEXT: shrl %cl, %eax
+; X86-SLOW-NEXT: addl %ebp, %ebp
+; X86-SLOW-NEXT: notb %cl
+; X86-SLOW-NEXT: shll %cl, %ebp
+; X86-SLOW-NEXT: movb %ch, %cl
+; X86-SLOW-NEXT: movl %ebp, %esi
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
+; X86-SLOW-NEXT: shrl %cl, %ebp
+; X86-SLOW-NEXT: testb $32, %ch
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: jne .LBB6_31
+; X86-SLOW-NEXT: # %bb.32:
+; X86-SLOW-NEXT: orl %ebp, %esi
+; X86-SLOW-NEXT: movl %esi, %ebp
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jb .LBB6_34
+; X86-SLOW-NEXT: jmp .LBB6_35
+; X86-SLOW-NEXT: .LBB6_31:
+; X86-SLOW-NEXT: movl %eax, %ebp
+; X86-SLOW-NEXT: xorl %eax, %eax
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jae .LBB6_35
+; X86-SLOW-NEXT: .LBB6_34:
+; X86-SLOW-NEXT: movl %ebp, %esi
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
+; X86-SLOW-NEXT: orl %eax, %ebp
+; X86-SLOW-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: movl %esi, %ebp
+; X86-SLOW-NEXT: .LBB6_35:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: cmpl $64, %ebx
+; X86-SLOW-NEXT: jae .LBB6_37
+; X86-SLOW-NEXT: # %bb.36:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; X86-SLOW-NEXT: orl %ebp, %eax
+; X86-SLOW-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; X86-SLOW-NEXT: .LBB6_37:
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %ebp
+; X86-SLOW-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-SLOW-NEXT: testl %ebx, %ebx
+; X86-SLOW-NEXT: je .LBB6_39
+; X86-SLOW-NEXT: # %bb.38:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload
+; X86-SLOW-NEXT: .LBB6_39:
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload
+; X86-SLOW-NEXT: cmpl $0, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Reload
+; X86-SLOW-NEXT: je .LBB6_41
+; X86-SLOW-NEXT: # %bb.40:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Reload
+; X86-SLOW-NEXT: .LBB6_41:
+; X86-SLOW-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Reload
+; X86-SLOW-NEXT: orl %ecx, %ebx
+; X86-SLOW-NEXT: orl %ebp, %edx
+; X86-SLOW-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Folded Reload
+; X86-SLOW-NEXT: movl %ebx, (%eax)
+; X86-SLOW-NEXT: movl %esi, 12(%eax)
+; X86-SLOW-NEXT: movl %edx, 4(%eax)
+; X86-SLOW-NEXT: movl %edi, 8(%eax)
+; X86-SLOW-NEXT: addl $72, %esp
+; X86-SLOW-NEXT: popl %esi
+; X86-SLOW-NEXT: popl %edi
+; X86-SLOW-NEXT: popl %ebx
+; X86-SLOW-NEXT: popl %ebp
+; X86-SLOW-NEXT: retl $4
+;
+; X64-FAST-LABEL: var_shift_i128:
+; X64-FAST: # %bb.0:
+; X64-FAST-NEXT: movq %r8, %r10
+; X64-FAST-NEXT: movq %rcx, %r9
+; X64-FAST-NEXT: movq %rdx, %r8
+; X64-FAST-NEXT: movq %rsi, %rdx
+; X64-FAST-NEXT: movl %r10d, %ecx
+; X64-FAST-NEXT: shrdq %cl, %r9, %r8
+; X64-FAST-NEXT: shrq %cl, %r9
+; X64-FAST-NEXT: xorl %eax, %eax
+; X64-FAST-NEXT: testb $64, %r10b
+; X64-FAST-NEXT: cmovneq %r9, %r8
+; X64-FAST-NEXT: cmovneq %rax, %r9
+; X64-FAST-NEXT: shldq $1, %rdi, %rdx
+; X64-FAST-NEXT: addq %rdi, %rdi
+; X64-FAST-NEXT: notb %r10b
+; X64-FAST-NEXT: movl %r10d, %ecx
+; X64-FAST-NEXT: shldq %cl, %rdi, %rdx
+; X64-FAST-NEXT: shlq %cl, %rdi
+; X64-FAST-NEXT: testb $64, %r10b
+; X64-FAST-NEXT: cmovneq %rdi, %rdx
+; X64-FAST-NEXT: cmoveq %rdi, %rax
+; X64-FAST-NEXT: orq %r8, %rax
+; X64-FAST-NEXT: orq %r9, %rdx
+; X64-FAST-NEXT: retq
+;
+; X64-SLOW-LABEL: var_shift_i128:
+; X64-SLOW: # %bb.0:
+; X64-SLOW-NEXT: movq %rcx, %r10
+; X64-SLOW-NEXT: movq %rdx, %r9
+; X64-SLOW-NEXT: movabsq $9223372036854775807, %rax # imm = 0x7FFFFFFFFFFFFFFF
+; X64-SLOW-NEXT: andq %rdi, %rax
+; X64-SLOW-NEXT: movl %r8d, %ecx
+; X64-SLOW-NEXT: shrq %cl, %rax
+; X64-SLOW-NEXT: movq %rdi, %rcx
+; X64-SLOW-NEXT: shrq $63, %rcx
+; X64-SLOW-NEXT: leaq (%rcx,%rsi,2), %rdx
+; X64-SLOW-NEXT: movl %r8d, %r11d
+; X64-SLOW-NEXT: notb %r11b
+; X64-SLOW-NEXT: movl %r11d, %ecx
+; X64-SLOW-NEXT: shlq %cl, %rdx
+; X64-SLOW-NEXT: orq %rax, %rdx
+; X64-SLOW-NEXT: movl %r8d, %ecx
+; X64-SLOW-NEXT: shrq %cl, %r9
+; X64-SLOW-NEXT: leaq (%r10,%r10), %rsi
+; X64-SLOW-NEXT: movl %r11d, %ecx
+; X64-SLOW-NEXT: shlq %cl, %rsi
+; X64-SLOW-NEXT: orq %r9, %rsi
+; X64-SLOW-NEXT: movl %r8d, %ecx
+; X64-SLOW-NEXT: shrq %cl, %r10
+; X64-SLOW-NEXT: xorl %eax, %eax
+; X64-SLOW-NEXT: testb $64, %r8b
+; X64-SLOW-NEXT: cmovneq %r10, %rsi
+; X64-SLOW-NEXT: cmovneq %rax, %r10
+; X64-SLOW-NEXT: addq %rdi, %rdi
+; X64-SLOW-NEXT: movl %r11d, %ecx
+; X64-SLOW-NEXT: shlq %cl, %rdi
+; X64-SLOW-NEXT: testb $64, %r11b
+; X64-SLOW-NEXT: cmovneq %rdi, %rdx
+; X64-SLOW-NEXT: cmoveq %rdi, %rax
+; X64-SLOW-NEXT: orq %rsi, %rax
+; X64-SLOW-NEXT: orq %r10, %rdx
+; X64-SLOW-NEXT: retq
+ %tmp = tail call i128 @llvm.fshr.i128(i128 %x, i128 %y, i128 %z)
+ ret i128 %tmp
+}
+
;
; Const Funnel Shift
;
More information about the llvm-commits
mailing list