brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.7 KiB · 6f31aef Raw
88 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 62; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2,+ssse3,+egpr --show-mc-encoding | FileCheck %s --check-prefixes=CHECK,SSE3; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse2,+ssse3,+egpr,+avx --show-mc-encoding | FileCheck %s --check-prefixes=CHECK,AVX4 5define i32 @map0(ptr nocapture noundef readonly %a, i64 noundef %b) {6; CHECK-LABEL: map0:7; CHECK:       # %bb.0: # %entry8; CHECK-NEXT:    movq %rsi, %r16 # encoding: [0xd5,0x18,0x89,0xf0]9; CHECK-NEXT:    movq %rdi, %r17 # encoding: [0xd5,0x18,0x89,0xf9]10; CHECK-NEXT:    #APP11; CHECK-NEXT:    nop # encoding: [0x90]12; CHECK-NEXT:    #NO_APP13; CHECK-NEXT:    movl (%r17,%r16,4), %eax # encoding: [0xd5,0x30,0x8b,0x04,0x81]14; CHECK-NEXT:    retq # encoding: [0xc3]15entry:16  %add.ptr = getelementptr inbounds i32, ptr %a, i64 %b17  tail call void asm sideeffect "nop", "~{eax},~{ecx},~{edx},~{esi},~{edi},~{r8},~{r9},~{r10},~{r11}"()18  %0 = load i32, ptr %add.ptr19  ret i32 %020}21 22define i32 @map1_or_vex(<2 x double> noundef %a) nounwind {23; SSE-LABEL: map1_or_vex:24; SSE:       # %bb.0: # %entry25; SSE-NEXT:    cvtsd2si %xmm0, %r16d # encoding: [0xf2,0xd5,0xc0,0x2d,0xc0]26; SSE-NEXT:    #APP27; SSE-NEXT:    nop # encoding: [0x90]28; SSE-NEXT:    #NO_APP29; SSE-NEXT:    movl %r16d, %eax # encoding: [0xd5,0x40,0x89,0xc0]30; SSE-NEXT:    retq # encoding: [0xc3]31;32; AVX-LABEL: map1_or_vex:33; AVX:       # %bb.0: # %entry34; AVX-NEXT:    pushq %rbx # encoding: [0x53]35; AVX-NEXT:    vcvtsd2si %xmm0, %ebx # encoding: [0xc5,0xfb,0x2d,0xd8]36; AVX-NEXT:    #APP37; AVX-NEXT:    nop # encoding: [0x90]38; AVX-NEXT:    #NO_APP39; AVX-NEXT:    movl %ebx, %eax # encoding: [0x89,0xd8]40; AVX-NEXT:    popq %rbx # encoding: [0x5b]41; AVX-NEXT:    retq # encoding: [0xc3]42entry:43  %0 = tail call i32 @llvm.x86.sse2.cvtsd2si(<2 x double> %a)44  tail call void asm sideeffect "nop", "~{eax},~{ecx},~{edx},~{esi},~{edi},~{r8},~{r9},~{r10},~{r11}"()45  ret i32 %046}47 48define <2 x i64> @map2_or_vex(ptr nocapture noundef readonly %b, i64 noundef %c) nounwind {49; SSE-LABEL: map2_or_vex:50; SSE:       # %bb.0: # %entry51; SSE-NEXT:    pushq %r14 # encoding: [0x41,0x56]52; SSE-NEXT:    pushq %rbx # encoding: [0x53]53; SSE-NEXT:    movq %rsi, %rbx # encoding: [0x48,0x89,0xf3]54; SSE-NEXT:    movq %rdi, %r14 # encoding: [0x49,0x89,0xfe]55; SSE-NEXT:    #APP56; SSE-NEXT:    nop # encoding: [0x90]57; SSE-NEXT:    #NO_APP58; SSE-NEXT:    pabsb (%r14,%rbx,4), %xmm0 # encoding: [0x66,0x41,0x0f,0x38,0x1c,0x04,0x9e]59; SSE-NEXT:    popq %rbx # encoding: [0x5b]60; SSE-NEXT:    popq %r14 # encoding: [0x41,0x5e]61; SSE-NEXT:    retq # encoding: [0xc3]62;63; AVX-LABEL: map2_or_vex:64; AVX:       # %bb.0: # %entry65; AVX-NEXT:    pushq %r14 # encoding: [0x41,0x56]66; AVX-NEXT:    pushq %rbx # encoding: [0x53]67; AVX-NEXT:    movq %rsi, %rbx # encoding: [0x48,0x89,0xf3]68; AVX-NEXT:    movq %rdi, %r14 # encoding: [0x49,0x89,0xfe]69; AVX-NEXT:    #APP70; AVX-NEXT:    nop # encoding: [0x90]71; AVX-NEXT:    #NO_APP72; AVX-NEXT:    vpabsb (%r14,%rbx,4), %xmm0 # encoding: [0xc4,0xc2,0x79,0x1c,0x04,0x9e]73; AVX-NEXT:    popq %rbx # encoding: [0x5b]74; AVX-NEXT:    popq %r14 # encoding: [0x41,0x5e]75; AVX-NEXT:    retq # encoding: [0xc3]76entry:77  tail call void asm sideeffect "nop", "~{eax},~{ecx},~{edx},~{esi},~{edi},~{r8},~{r9},~{r10},~{r11}"()78  %add.ptr = getelementptr inbounds i32, ptr %b, i64 %c79  %a = load <2 x i64>, ptr %add.ptr80  %0 = bitcast <2 x i64> %a to <16 x i8>81  %elt.abs.i = tail call <16 x i8> @llvm.abs.v16i8(<16 x i8> %0, i1 false)82  %1 = bitcast <16 x i8> %elt.abs.i to <2 x i64>83  ret <2 x i64> %184}85 86declare i32 @llvm.x86.sse2.cvtsd2si(<2 x double>)87declare <16 x i8> @llvm.abs.v16i8(<16 x i8>, i1 immarg)88