brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · b7de01b Raw
57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=+ptwrite | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+ptwrite | FileCheck %s --check-prefix=X86_644 5define void @test_ptwrite(i32 %value) {6; X86-LABEL: test_ptwrite:7; X86:       # %bb.0: # %entry8; X86-NEXT:    ptwritel {{[0-9]+}}(%esp)9; X86-NEXT:    retl10;11; X86_64-LABEL: test_ptwrite:12; X86_64:       # %bb.0: # %entry13; X86_64-NEXT:    ptwritel %edi14; X86_64-NEXT:    retq15entry:16  call void @llvm.x86.ptwrite32(i32 %value)17  ret void18}19 20define void @test_ptwrite2(i32 %x) {21; X86-LABEL: test_ptwrite2:22; X86:       # %bb.0: # %entry23; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax24; X86-NEXT:    incl %eax25; X86-NEXT:    ptwritel %eax26; X86-NEXT:    retl27;28; X86_64-LABEL: test_ptwrite2:29; X86_64:       # %bb.0: # %entry30; X86_64-NEXT:    incl %edi31; X86_64-NEXT:    ptwritel %edi32; X86_64-NEXT:    retq33entry:34  %value = add i32 %x, 135  call void @llvm.x86.ptwrite32(i32 %value)36  ret void37}38 39define void @test_ptwrite32p(ptr %pointer) {40; X86-LABEL: test_ptwrite32p:41; X86:       # %bb.0: # %entry42; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax43; X86-NEXT:    ptwritel (%eax)44; X86-NEXT:    retl45;46; X86_64-LABEL: test_ptwrite32p:47; X86_64:       # %bb.0: # %entry48; X86_64-NEXT:    ptwritel (%rdi)49; X86_64-NEXT:    retq50entry:51  %value = load i32, ptr %pointer, align 452  call void @llvm.x86.ptwrite32(i32 %value)53  ret void54}55 56declare void @llvm.x86.ptwrite32(i32)57