53 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+movdiri -mattr=+movdir64b | FileCheck %s --check-prefix=X323; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+movdiri -mattr=+movdir64b --show-mc-encoding | FileCheck %s --check-prefix=X644; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+movdiri -mattr=+movdir64b,+egpr --show-mc-encoding | FileCheck %s --check-prefix=EGPR5 6define void @test_movdiri(ptr %p, i32 %v) {7; X32-LABEL: test_movdiri:8; X32: # %bb.0: # %entry9; X32-NEXT: movl {{[0-9]+}}(%esp), %eax10; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx11; X32-NEXT: movdiri %eax, (%ecx)12; X32-NEXT: retl13;14; X64-LABEL: test_movdiri:15; X64: # %bb.0: # %entry16; X64-NEXT: movdiri %esi, (%rdi) # encoding: [0x0f,0x38,0xf9,0x37]17; X64-NEXT: retq # encoding: [0xc3]18;19; EGPR-LABEL: test_movdiri:20; EGPR: # %bb.0: # %entry21; EGPR-NEXT: movdiri %esi, (%rdi) # EVEX TO LEGACY Compression encoding: [0x0f,0x38,0xf9,0x37]22; EGPR-NEXT: retq # encoding: [0xc3]23entry:24 call void @llvm.x86.directstore32(ptr %p, i32 %v)25 ret void26}27 28declare void @llvm.x86.directstore32(ptr, i32)29 30define void @test_movdir64b(ptr %dst, ptr %src) {31; X32-LABEL: test_movdir64b:32; X32: # %bb.0: # %entry33; X32-NEXT: movl {{[0-9]+}}(%esp), %eax34; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx35; X32-NEXT: movdir64b (%eax), %ecx36; X32-NEXT: retl37;38; X64-LABEL: test_movdir64b:39; X64: # %bb.0: # %entry40; X64-NEXT: movdir64b (%rsi), %rdi # encoding: [0x66,0x0f,0x38,0xf8,0x3e]41; X64-NEXT: retq # encoding: [0xc3]42;43; EGPR-LABEL: test_movdir64b:44; EGPR: # %bb.0: # %entry45; EGPR-NEXT: movdir64b (%rsi), %rdi # EVEX TO LEGACY Compression encoding: [0x66,0x0f,0x38,0xf8,0x3e]46; EGPR-NEXT: retq # encoding: [0xc3]47entry:48 call void @llvm.x86.movdir64b(ptr %dst, ptr %src)49 ret void50}51 52declare void @llvm.x86.movdir64b(ptr, ptr)53