[llvm] 13796d1 - [X86] Add test case for PR47000. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 15:47:39 PDT 2020
Author: Craig Topper
Date: 2020-08-05T15:44:53-07:00
New Revision: 13796d14238baabff972e15ceddb4ae61b1584b8
URL: https://github.com/llvm/llvm-project/commit/13796d14238baabff972e15ceddb4ae61b1584b8
DIFF: https://github.com/llvm/llvm-project/commit/13796d14238baabff972e15ceddb4ae61b1584b8.diff
LOG: [X86] Add test case for PR47000. NFC
Added:
llvm/test/CodeGen/X86/pr47000.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/pr47000.ll b/llvm/test/CodeGen/X86/pr47000.ll
new file mode 100755
index 000000000000..e6ddf3d97c19
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr47000.ll
@@ -0,0 +1,151 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_rip
+; RUN: llc < %s -mcpu=pentium4 -O0 | FileCheck %s
+
+target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
+target triple = "i386-unknown-linux-unknown"
+
+define <4 x half> @doTheTestMod(<4 x half> %0, <4 x half> %1) nounwind {
+; CHECK-LABEL: doTheTestMod:
+; CHECK: # %bb.0: # %Entry
+; CHECK-NEXT: pushl %ebp
+; CHECK-NEXT: pushl %ebx
+; CHECK-NEXT: pushl %edi
+; CHECK-NEXT: pushl %esi
+; CHECK-NEXT: subl $124, %esp
+; CHECK-NEXT: movl 144(%esp), %eax
+; CHECK-NEXT: movl %eax, %ecx
+; CHECK-NEXT: movw 176(%esp), %dx
+; CHECK-NEXT: movw 172(%esp), %si
+; CHECK-NEXT: movw 164(%esp), %di
+; CHECK-NEXT: movw 166(%esp), %bx
+; CHECK-NEXT: movw 160(%esp), %bp
+; CHECK-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movw 156(%esp), %ax
+; CHECK-NEXT: movw %ax, {{[-0-9]+}}(%e{{[sb]}}p) # 2-byte Spill
+; CHECK-NEXT: movw 148(%esp), %ax
+; CHECK-NEXT: movw %ax, {{[-0-9]+}}(%e{{[sb]}}p) # 2-byte Spill
+; CHECK-NEXT: movw 150(%esp), %ax
+; CHECK-NEXT: movw %ax, {{[-0-9]+}}(%e{{[sb]}}p) # 2-byte Spill
+; CHECK-NEXT: movw {{[-0-9]+}}(%e{{[sb]}}p), %ax # 2-byte Reload
+; CHECK-NEXT: movw %ax, 112(%esp)
+; CHECK-NEXT: movw {{[-0-9]+}}(%e{{[sb]}}p), %ax # 2-byte Reload
+; CHECK-NEXT: movw %ax, 114(%esp)
+; CHECK-NEXT: movw {{[-0-9]+}}(%e{{[sb]}}p), %ax # 2-byte Reload
+; CHECK-NEXT: movw %ax, 116(%esp)
+; CHECK-NEXT: movw %bp, 118(%esp)
+; CHECK-NEXT: movw %dx, 110(%esp)
+; CHECK-NEXT: movw %si, 108(%esp)
+; CHECK-NEXT: movw %bx, 106(%esp)
+; CHECK-NEXT: movw %di, 104(%esp)
+; CHECK-NEXT: movzwl 118(%esp), %edx
+; CHECK-NEXT: movzwl 116(%esp), %esi
+; CHECK-NEXT: movzwl 114(%esp), %edi
+; CHECK-NEXT: movzwl 112(%esp), %ebx
+; CHECK-NEXT: movzwl 110(%esp), %ebp
+; CHECK-NEXT: movzwl 108(%esp), %eax
+; CHECK-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movzwl 106(%esp), %eax
+; CHECK-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movzwl 104(%esp), %eax
+; CHECK-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: movl %ebx, (%eax)
+; CHECK-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; CHECK-NEXT: movl %ecx, (%eax)
+; CHECK-NEXT: fstpt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps 4(%eax)
+; CHECK-NEXT: fldt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Reload
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll fmodf
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll __gnu_f2h_ieee
+; CHECK-NEXT: movl %esp, %ecx
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; CHECK-NEXT: movl %edx, (%ecx)
+; CHECK-NEXT: movw %ax, {{[-0-9]+}}(%e{{[sb]}}p) # 2-byte Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; CHECK-NEXT: movl %ecx, (%eax)
+; CHECK-NEXT: fstpt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps 4(%eax)
+; CHECK-NEXT: fldt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Reload
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll fmodf
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll __gnu_f2h_ieee
+; CHECK-NEXT: movl %esp, %ecx
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; CHECK-NEXT: movl %edx, (%ecx)
+; CHECK-NEXT: movw %ax, {{[-0-9]+}}(%e{{[sb]}}p) # 2-byte Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; CHECK-NEXT: movl %ecx, (%eax)
+; CHECK-NEXT: fstpt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps 4(%eax)
+; CHECK-NEXT: fldt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Reload
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll fmodf
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll __gnu_f2h_ieee
+; CHECK-NEXT: movl %esp, %ecx
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx # 4-byte Reload
+; CHECK-NEXT: movl %edx, (%ecx)
+; CHECK-NEXT: movw %ax, {{[-0-9]+}}(%e{{[sb]}}p) # 2-byte Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; CHECK-NEXT: movl %ecx, (%eax)
+; CHECK-NEXT: fstpt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Spill
+; CHECK-NEXT: calll __gnu_h2f_ieee
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps 4(%eax)
+; CHECK-NEXT: fldt {{[-0-9]+}}(%e{{[sb]}}p) # 10-byte Folded Reload
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll fmodf
+; CHECK-NEXT: movl %esp, %eax
+; CHECK-NEXT: fstps (%eax)
+; CHECK-NEXT: calll __gnu_f2h_ieee
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload
+; CHECK-NEXT: movw %ax, 6(%ecx)
+; CHECK-NEXT: movw {{[-0-9]+}}(%e{{[sb]}}p), %ax # 2-byte Reload
+; CHECK-NEXT: movw %ax, 4(%ecx)
+; CHECK-NEXT: movw {{[-0-9]+}}(%e{{[sb]}}p), %dx # 2-byte Reload
+; CHECK-NEXT: movw %dx, 2(%ecx)
+; CHECK-NEXT: movw {{[-0-9]+}}(%e{{[sb]}}p), %si # 2-byte Reload
+; CHECK-NEXT: movw %si, (%ecx)
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload
+; CHECK-NEXT: addl $124, %esp
+; CHECK-NEXT: popl %esi
+; CHECK-NEXT: popl %edi
+; CHECK-NEXT: popl %ebx
+; CHECK-NEXT: popl %ebp
+; CHECK-NEXT: retl $4
+Entry:
+ %x = alloca <4 x half>, align 8
+ %y = alloca <4 x half>, align 8
+ store <4 x half> %0, <4 x half>* %x, align 8
+ store <4 x half> %1, <4 x half>* %y, align 8
+ %2 = load <4 x half>, <4 x half>* %x, align 8
+ %3 = load <4 x half>, <4 x half>* %y, align 8
+ %4 = frem <4 x half> %2, %3
+ ret <4 x half> %4
+}
+
More information about the llvm-commits
mailing list