summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll6
-rw-r--r--llvm/test/CodeGen/X86/stack-folding-int-sse42.ll19
2 files changed, 16 insertions, 9 deletions
diff --git a/llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll b/llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
index f8d7f61d206..8ff3fae6509 100644
--- a/llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
+++ b/llvm/test/CodeGen/X86/sse42-intrinsics-fast-isel.ll
@@ -354,9 +354,8 @@ declare i32 @llvm.x86.sse42.pcmpistriz128(<16 x i8>, <16 x i8>, i8) nounwind rea
define i32 @test_mm_crc32_u8(i32 %a0, i8 %a1) {
; X32-LABEL: test_mm_crc32_u8:
; X32: # %bb.0:
-; X32-NEXT: movb {{[0-9]+}}(%esp), %cl
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: crc32b %cl, %eax
+; X32-NEXT: crc32b {{[0-9]+}}(%esp), %eax
; X32-NEXT: retl
;
; X64-LABEL: test_mm_crc32_u8:
@@ -372,9 +371,8 @@ declare i32 @llvm.x86.sse42.crc32.32.8(i32, i8) nounwind readnone
define i32 @test_mm_crc32_u16(i32 %a0, i16 %a1) {
; X32-LABEL: test_mm_crc32_u16:
; X32: # %bb.0:
-; X32-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: crc32w %cx, %eax
+; X32-NEXT: crc32w {{[0-9]+}}(%esp), %eax
; X32-NEXT: retl
;
; X64-LABEL: test_mm_crc32_u16:
diff --git a/llvm/test/CodeGen/X86/stack-folding-int-sse42.ll b/llvm/test/CodeGen/X86/stack-folding-int-sse42.ll
index 136077e2917..7f307681178 100644
--- a/llvm/test/CodeGen/X86/stack-folding-int-sse42.ll
+++ b/llvm/test/CodeGen/X86/stack-folding-int-sse42.ll
@@ -62,10 +62,22 @@ define <2 x i64> @stack_fold_aeskeygenassist(<2 x i64> %a0) {
}
declare <2 x i64> @llvm.x86.aesni.aeskeygenassist(<2 x i64>, i8) nounwind readnone
-;TODO stack_fold_crc32_32_8
+define i32 @stack_fold_crc32_32_8(i32 %a0, i8 %a1) {
+ ;CHECK-LABEL: stack_fold_crc32_32_8
+ ;CHECK: crc32b {{-?[0-9]*}}(%rsp), %eax {{.*#+}} 1-byte Folded Reload
+ %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"()
+ %2 = call i32 @llvm.x86.sse42.crc32.32.8(i32 %a0, i8 %a1)
+ ret i32 %2
+}
declare i32 @llvm.x86.sse42.crc32.32.8(i32, i8) nounwind
-;TODO stack_fold_crc32_32_16
+define i32 @stack_fold_crc32_32_16(i32 %a0, i16 %a1) {
+ ;CHECK-LABEL: stack_fold_crc32_32_16
+ ;CHECK: crc32w {{-?[0-9]*}}(%rsp), %eax {{.*#+}} 2-byte Folded Reload
+ %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{rbx},~{rcx},~{rdx},~{rsi},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15}"()
+ %2 = call i32 @llvm.x86.sse42.crc32.32.16(i32 %a0, i16 %a1)
+ ret i32 %2
+}
declare i32 @llvm.x86.sse42.crc32.32.16(i32, i16) nounwind
define i32 @stack_fold_crc32_32_32(i32 %a0, i32 %a1) {
@@ -77,9 +89,6 @@ define i32 @stack_fold_crc32_32_32(i32 %a0, i32 %a1) {
}
declare i32 @llvm.x86.sse42.crc32.32.32(i32, i32) nounwind
-;TODO stack_fold_crc32_64_8
-declare i64 @llvm.x86.sse42.crc32.64.8(i64, i8) nounwind
-
define i64 @stack_fold_crc32_64_64(i64 %a0, i64 %a1) {
;CHECK-LABEL: stack_fold_crc32_64_64
;CHECK: crc32q {{-?[0-9]*}}(%rsp), %rax {{.*#+}} 8-byte Folded Reload
OpenPOWER on IntegriCloud