Fangrui Song 9ef1d37ffb [AVR,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, 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 avr-apple-darwin as ELF instead
of rejecting it outrightly.
2024-12-15 10:26:33 -08:00

16 lines
486 B
LLVM

; RUN: llc < %s -mtriple=avr -mcpu=atmega328 -O1 -verify-machineinstrs | FileCheck %s
; CHECK-NOT: stdwstk
; Checks that we expand STDWSPQRr always - even if it appears outside of the
; FrameSetup/FrameDestroy context.
declare { } @foo(i128, i128) addrspace(1)
define i128 @bar(i128 %a, i128 %b) addrspace(1) {
%b_neg = icmp slt i128 %b, 0
%divisor = select i1 %b_neg, i128 0, i128 %b
%result = tail call fastcc addrspace(1) { } @foo(i128 undef, i128 %divisor)
ret i128 0
}