brintos

brintos / llvm-project-archived public Read only

0
0
Text · 876 B · 8350990 Raw
27 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \3; RUN:   | FileCheck -check-prefix=RV32I %s4; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \5; RUN:   | FileCheck -check-prefix=RV64I %s6 7; Verify that we lower @llvm.readcyclecounter() correctly.8 9define i64 @test_builtin_readcyclecounter() nounwind {10; RV32I-LABEL: test_builtin_readcyclecounter:11; RV32I:       # %bb.0:12; RV32I-NEXT:  .LBB0_1: # =>This Inner Loop Header: Depth=113; RV32I-NEXT:    rdcycleh a114; RV32I-NEXT:    rdcycle a015; RV32I-NEXT:    rdcycleh a216; RV32I-NEXT:    bne a1, a2, .LBB0_117; RV32I-NEXT:  # %bb.2:18; RV32I-NEXT:    ret19;20; RV64I-LABEL: test_builtin_readcyclecounter:21; RV64I:       # %bb.0:22; RV64I-NEXT:    rdcycle a023; RV64I-NEXT:    ret24  %1 = tail call i64 @llvm.readcyclecounter()25  ret i64 %126}27