llvm-project/llvm/test/CodeGen/AVR/std-ldd-immediate-overflow.ll
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

19 lines
538 B
LLVM

; RUN: llc -O0 < %s -mtriple=avr | FileCheck %s
define i32 @std_ldd_overflow() {
%src = alloca [4 x i8]
%dst = alloca [4 x i8]
%buf = alloca [28 x i16]
%1 = bitcast ptr %src to ptr
store i32 0, ptr %1
%2 = bitcast ptr %dst to ptr
%3 = bitcast ptr %src to ptr
call void @llvm.memcpy.p0.p0.i16(ptr %2, ptr %3, i16 4, i1 false)
; CHECK-NOT: std {{[XYZ]}}+64, {{r[0-9]+}}
; CHECK-NOT: ldd {{r[0-9]+}}, {{[XYZ]}}+64
ret i32 0
}
declare void @llvm.memcpy.p0.p0.i16(ptr nocapture writeonly, ptr nocapture readonly, i16, i1)