brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 41fa346 Raw
73 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc %s -mtriple=x86_64-unknown -mattr=+ndd -verify-machineinstrs --show-mc-encoding -o - | FileCheck %s --check-prefix=NDD3 4 5define void @neg_8bit_1(i1 %cmp) {6; NDD-LABEL: neg_8bit_1:7; NDD:       # %bb.0: # %entry8; NDD-NEXT:    andb $1, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0x80,0xe7,0x01]9; NDD-NEXT:    movzbl 0, %ecx # encoding: [0x0f,0xb6,0x0c,0x25,0x00,0x00,0x00,0x00]10; NDD-NEXT:    negb %al, %al # encoding: [0x62,0xf4,0x7c,0x18,0xf6,0xd8]11; NDD-NEXT:    leal 2(%rcx,%rax), %eax # encoding: [0x8d,0x44,0x01,0x02]12; NDD-NEXT:    movb %al, 0 # encoding: [0x88,0x04,0x25,0x00,0x00,0x00,0x00]13; NDD-NEXT:    retq # encoding: [0xc3]14entry:15  %cond = select i1 %cmp, i8 1, i8 216  %0 = load i8, ptr null, align 417  %add = add i8 %cond, %018  store i8 %add, ptr null, align 419  ret void20}21 22define void @neg_8bit_2(i8 %int8) {23; NDD-LABEL: neg_8bit_2:24; NDD:       # %bb.0: # %entry25; NDD-NEXT:    # kill: def $edi killed $edi def $rdi26; NDD-NEXT:    addb %dil, %dil, %al # encoding: [0x62,0xf4,0x7c,0x18,0x00,0xff]27; NDD-NEXT:    negb %al, %al # encoding: [0x62,0xf4,0x7c,0x18,0xf6,0xd8]28; NDD-NEXT:    leal 1(%rdi,%rax), %eax # encoding: [0x8d,0x44,0x07,0x01]29; NDD-NEXT:    # kill: def $al killed $al killed $eax30; NDD-NEXT:    mulb %dil # encoding: [0x40,0xf6,0xe7]31; NDD-NEXT:    testb %al, %al # encoding: [0x84,0xc0]32; NDD-NEXT:    retq # encoding: [0xc3]33entry:34  %0 = shl i8 %int8, 135  %sub = sub i8 %int8, %036  %add = add i8 %sub, 137  %div = mul i8 %add, %int838  %cmp = icmp slt i8 %div, 039  br i1 %cmp, label %label2, label %label140 41label1:                             ; preds = %entry42  ret void43 44label2:                             ; preds = %entry45  ret void46}47 48define i32 @neg_16bit(i16 %0) {49; NDD-LABEL: neg_16bit:50; NDD:       # %bb.0: # %entry51; NDD-NEXT:    # kill: def $edi killed $edi def $rdi52; NDD-NEXT:    incw %di, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xff,0xc7]53; NDD-NEXT:    addw $256, %di, %cx # encoding: [0x62,0xf4,0x75,0x18,0x81,0xc7,0x00,0x01]54; NDD-NEXT:    # imm = 0x10055; NDD-NEXT:    testw %ax, %ax # encoding: [0x66,0x85,0xc0]56; NDD-NEXT:    cmovsl %ecx, %eax # EVEX TO LEGACY Compression encoding: [0x0f,0x48,0xc1]57; NDD-NEXT:    andw $-256, %ax # EVEX TO LEGACY Compression encoding: [0x66,0x25,0x00,0xff]58; NDD-NEXT:    negw %ax, %ax # encoding: [0x62,0xf4,0x7d,0x18,0xf7,0xd8]59; NDD-NEXT:    leal 1(%rdi,%rax), %eax # encoding: [0x8d,0x44,0x07,0x01]60; NDD-NEXT:    movzwl %ax, %eax # encoding: [0x0f,0xb7,0xc0]61; NDD-NEXT:    movq %rax, 0 # encoding: [0x48,0x89,0x04,0x25,0x00,0x00,0x00,0x00]62; NDD-NEXT:    xorl %eax, %eax # encoding: [0x31,0xc0]63; NDD-NEXT:    retq # encoding: [0xc3]64entry:65  %add = add i16 %0, 166  %rem = srem i16 %add, 25667  %1 = zext i16 %rem to i1968  %2 = sext i19 %1 to i6469  %3 = getelementptr i8, ptr null, i64 %270  store ptr %3, ptr null, align 471  ret i32 072}73