1; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+xsave,+xsaves | FileCheck %s 2 3define void @test_xsaves(i8* %ptr, i32 %hi, i32 %lo) { 4; CHECK-LABEL: test_xsaves 5; CHECK: movl %edx, %eax 6; CHECK: movl %esi, %edx 7; CHECK: xsaves (%rdi) 8 call void @llvm.x86.xsaves(i8* %ptr, i32 %hi, i32 %lo) 9 ret void; 10} 11declare void @llvm.x86.xsaves(i8*, i32, i32) 12 13define void @test_xsaves64(i8* %ptr, i32 %hi, i32 %lo) { 14; CHECK-LABEL: test_xsaves64 15; CHECK: movl %edx, %eax 16; CHECK: movl %esi, %edx 17; CHECK: xsaves64 (%rdi) 18 call void @llvm.x86.xsaves64(i8* %ptr, i32 %hi, i32 %lo) 19 ret void; 20} 21declare void @llvm.x86.xsaves64(i8*, i32, i32) 22 23define void @test_xrstors(i8* %ptr, i32 %hi, i32 %lo) { 24; CHECK-LABEL: test_xrstors 25; CHECK: movl %edx, %eax 26; CHECK: movl %esi, %edx 27; CHECK: xrstors (%rdi) 28 call void @llvm.x86.xrstors(i8* %ptr, i32 %hi, i32 %lo) 29 ret void; 30} 31declare void @llvm.x86.xrstors(i8*, i32, i32) 32 33define void @test_xrstors64(i8* %ptr, i32 %hi, i32 %lo) { 34; CHECK-LABEL: test_xrstors64 35; CHECK: movl %edx, %eax 36; CHECK: movl %esi, %edx 37; CHECK: xrstors64 (%rdi) 38 call void @llvm.x86.xrstors64(i8* %ptr, i32 %hi, i32 %lo) 39 ret void; 40} 41declare void @llvm.x86.xrstors64(i8*, i32, i32) 42