Fangrui Song 728490257e [Sparc,test] Change llc -march= to -mtriple=
Similar to 806761a7629df268c8aed49657aeccffa6bca449

-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple (e.g. Windows, macOS),
leaving a target triple which may not make sense.

Therefore, -march= is error-prone and not recommended for tests without a target
triple. The issue has been benign as we recognize sparc*-apple-darwin as ELF instead
of rejecting it outrightly.
2024-12-15 10:29:34 -08:00

12 lines
249 B
LLVM

; RUN: llc < %s -mtriple=sparc -mcpu=gr740 -verify-machineinstrs | FileCheck %s
; CHECK: rd %asr23, %o1
; CHECK: mov %g0, %o0
define i64 @test() {
entry:
%0 = call i64 @llvm.readcyclecounter()
ret i64 %0
}
declare i64 @llvm.readcyclecounter()