Files
clang-p2996/llvm/test/CodeGen/AVR/frmidx-iterator-bug.ll
Fangrui Song 9ef1d37ffb [AVR,test] Change llc -march= to -mtriple=
Similar to 806761a762

-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

34 lines
760 B
LLVM

; RUN: llc < %s -mtriple=avr -mattr=avr6 | FileCheck %s
%str_slice = type { ptr, i16 }
%Machine = type { i16, [0 x i8], i16, [0 x i8], [16 x i8], [0 x i8] }
; CHECK-LABEL: step
define void @step(ptr) {
ret void
}
; CHECK-LABEL: main
define void @main() {
start:
%machine = alloca %Machine, align 8
%v0 = bitcast ptr %machine to ptr
%v1 = getelementptr inbounds %Machine, ptr %machine, i16 0, i32 2
%v2 = load i16, ptr %v1, align 2
br label %bb2.i5
bb2.i5:
%v18 = load volatile i8, ptr inttoptr (i16 77 to ptr), align 1
%v19 = icmp sgt i8 %v18, -1
br i1 %v19, label %bb2.i5, label %bb.exit6
bb.exit6:
%v20 = load volatile i8, ptr inttoptr (i16 78 to ptr), align 2
br label %bb7
bb7:
call void @step(ptr %machine)
br label %bb7
}