1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+movdiri -mattr=+movdir64b | FileCheck %s --check-prefix=X32 3; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+movdiri -mattr=+movdir64b --show-mc-encoding | FileCheck %s --check-prefix=X64 4; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+movdiri -mattr=+movdir64b,+egpr --show-mc-encoding | FileCheck %s --check-prefix=EGPR 5 6define void @test_movdiri(ptr %p, i32 %v) { 7; X32-LABEL: test_movdiri: 8; X32: # %bb.0: # %entry 9; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 10; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx 11; X32-NEXT: movdiri %eax, (%ecx) 12; X32-NEXT: retl 13; 14; X64-LABEL: test_movdiri: 15; X64: # %bb.0: # %entry 16; 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: # %entry 21; 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 void 26} 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: # %entry 33; X32-NEXT: movl {{[0-9]+}}(%esp), %eax 34; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx 35; X32-NEXT: movdir64b (%eax), %ecx 36; X32-NEXT: retl 37; 38; X64-LABEL: test_movdir64b: 39; X64: # %bb.0: # %entry 40; 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: # %entry 45; 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 void 50} 51 52declare void @llvm.x86.movdir64b(ptr, ptr) 53