• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-- -mattr=rdpid | FileCheck %s --check-prefix=X86-64
3; RUN: llc < %s -mtriple=i686-- -mattr=rdpid | FileCheck %s --check-prefix=X86
4
5define i32 @test_builtin_rdpid() {
6; X86-64-LABEL: test_builtin_rdpid:
7; X86-64:       # %bb.0:
8; X86-64-NEXT:    rdpid %rax
9; X86-64-NEXT:    # kill: def $eax killed $eax killed $rax
10; X86-64-NEXT:    retq
11;
12; X86-LABEL: test_builtin_rdpid:
13; X86:       # %bb.0:
14; X86-NEXT:    rdpid %eax
15; X86-NEXT:    retl
16  %1 = tail call i32 @llvm.x86.rdpid()
17  ret i32 %1
18}
19
20declare i32 @llvm.x86.rdpid()
21
22