Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86-64 -mcpu=generic | FileCheck %s --check-prefix=CHECK --check-prefix=X86-64
      2 ; RUN: llc < %s -march=x86 -mcpu=generic | FileCheck %s --check-prefix=CHECK --check-prefix=X86
      3 
      4 ; Verify that we correctly lower the "Read Performance-Monitoring Counters"
      5 ; x86 builtin.
      6 
      7 
      8 define i64 @test_builtin_read_pmc(i32 %ID) {
      9   %1 = tail call i64 @llvm.x86.rdpmc(i32 %ID)
     10   ret i64 %1
     11 }
     12 ; CHECK-LABEL: test_builtin_read_pmc
     13 ; CHECK: rdpmc
     14 ; X86-NOT: shlq
     15 ; X86-NOT: or
     16 ; X86-64: shlq
     17 ; X86-64: or
     18 ; CHECK-NOT: mov
     19 ; CHECK: ret
     20 
     21 declare i64 @llvm.x86.rdpmc(i32 %ID)
     22 
     23