brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 2812447 Raw
45 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2;3; PR30298: Check if the target doesn't have SSE2, compiler will not crash4; or generate incorrect code because of vector mul width shrinking optimization.5;6; RUN: llc -mtriple=i386-pc-linux-gnu -mattr=+sse < %s | FileCheck %s7 8@c = external dso_local global ptr, align 89 10define void @mul_2xi8(ptr nocapture readonly %a, ptr nocapture readonly %b, i64 %index) nounwind {11; CHECK-LABEL: mul_2xi8:12; CHECK:       # %bb.0: # %entry13; CHECK-NEXT:    pushl %ebx14; CHECK-NEXT:    pushl %edi15; CHECK-NEXT:    pushl %esi16; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax17; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %ecx18; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %edx19; CHECK-NEXT:    movl c, %esi20; CHECK-NEXT:    movzbl 1(%edx,%ecx), %edi21; CHECK-NEXT:    movzbl (%edx,%ecx), %edx22; CHECK-NEXT:    movzbl 1(%eax,%ecx), %ebx23; CHECK-NEXT:    imull %edi, %ebx24; CHECK-NEXT:    movzbl (%eax,%ecx), %eax25; CHECK-NEXT:    imull %edx, %eax26; CHECK-NEXT:    movl %ebx, 4(%esi,%ecx,4)27; CHECK-NEXT:    movl %eax, (%esi,%ecx,4)28; CHECK-NEXT:    popl %esi29; CHECK-NEXT:    popl %edi30; CHECK-NEXT:    popl %ebx31; CHECK-NEXT:    retl32entry:33  %pre = load ptr, ptr @c34  %tmp6 = getelementptr inbounds i8, ptr %a, i64 %index35  %wide.load = load <2 x i8>, ptr %tmp6, align 136  %tmp8 = zext <2 x i8> %wide.load to <2 x i32>37  %tmp10 = getelementptr inbounds i8, ptr %b, i64 %index38  %wide.load17 = load <2 x i8>, ptr %tmp10, align 139  %tmp12 = zext <2 x i8> %wide.load17 to <2 x i32>40  %tmp13 = mul nuw nsw <2 x i32> %tmp12, %tmp841  %tmp14 = getelementptr inbounds i32, ptr %pre, i64 %index42  store <2 x i32> %tmp13, ptr %tmp14, align 443  ret void44}45