|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 | +; RUN: llc -mtriple=i386-pc-linux-gnu -mattr=+sse < %s | FileCheck %s |
| 3 | + |
| 4 | +@c = external global i32*, align 8 |
| 5 | + |
| 6 | +define void @mul_2xi8(i8* nocapture readonly %a, i8* nocapture readonly %b, i64 %index) nounwind { |
| 7 | +; CHECK-LABEL: mul_2xi8: |
| 8 | +; CHECK: # BB#0: # %entry |
| 9 | +; CHECK-NEXT: pushl %ebx |
| 10 | +; CHECK-NEXT: pushl %edi |
| 11 | +; CHECK-NEXT: pushl %esi |
| 12 | +; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax |
| 13 | +; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx |
| 14 | +; CHECK-NEXT: movl {{[0-9]+}}(%esp), %edx |
| 15 | +; CHECK-NEXT: movl c, %esi |
| 16 | +; CHECK-NEXT: movzbl 1(%edx,%ecx), %edi |
| 17 | +; CHECK-NEXT: movzbl (%edx,%ecx), %edx |
| 18 | +; CHECK-NEXT: movzbl 1(%eax,%ecx), %ebx |
| 19 | +; CHECK-NEXT: movzbl (%eax,%ecx), %eax |
| 20 | +; CHECK-NEXT: imull %edx, %eax |
| 21 | +; CHECK-NEXT: imull %edi, %ebx |
| 22 | +; CHECK-NEXT: movl %ebx, 4(%esi,%ecx,4) |
| 23 | +; CHECK-NEXT: movl %eax, (%esi,%ecx,4) |
| 24 | +; CHECK-NEXT: popl %esi |
| 25 | +; CHECK-NEXT: popl %edi |
| 26 | +; CHECK-NEXT: popl %ebx |
| 27 | +; CHECK-NEXT: retl |
| 28 | +entry: |
| 29 | + %pre = load i32*, i32** @c |
| 30 | + %tmp6 = getelementptr inbounds i8, i8* %a, i64 %index |
| 31 | + %tmp7 = bitcast i8* %tmp6 to <2 x i8>* |
| 32 | + %wide.load = load <2 x i8>, <2 x i8>* %tmp7, align 1 |
| 33 | + %tmp8 = zext <2 x i8> %wide.load to <2 x i32> |
| 34 | + %tmp10 = getelementptr inbounds i8, i8* %b, i64 %index |
| 35 | + %tmp11 = bitcast i8* %tmp10 to <2 x i8>* |
| 36 | + %wide.load17 = load <2 x i8>, <2 x i8>* %tmp11, align 1 |
| 37 | + %tmp12 = zext <2 x i8> %wide.load17 to <2 x i32> |
| 38 | + %tmp13 = mul nuw nsw <2 x i32> %tmp12, %tmp8 |
| 39 | + %tmp14 = getelementptr inbounds i32, i32* %pre, i64 %index |
| 40 | + %tmp15 = bitcast i32* %tmp14 to <2 x i32>* |
| 41 | + store <2 x i32> %tmp13, <2 x i32>* %tmp15, align 4 |
| 42 | + ret void |
| 43 | +} |
0 commit comments