1 ; RUN: llc -mattr=avr6,sram < %s -march=avr | FileCheck %s
3 ; This file tests whether the compiler correctly works with the r1 register,
4 ; clearing it when needed.
6 ; Test regular use of r1 as a zero register.
7 ; CHECK-LABEL: store8zero:
8 ; CHECK: st {{[XYZ]}}, r1
9 ; CHECK-NEXT: mov r24, r1
11 define i8 @store8zero(i8* %x) {
16 ; Test that mulitplication instructions (mul, muls, etc) clobber r1 and require
17 ; a "clr r1" instruction.
21 ; CHECK-NEXT: st {{[XYZ]}}, r0
23 define void @mul(i8* %ptr, i8 %n) {
24 %result = mul i8 %n, 3
25 store i8 %result, i8* %ptr