2020-03-03 16:52:20 +08:00
|
|
|
; RUN: llc -mattr=avr6,sram < %s -march=avr -verify-machineinstrs | FileCheck %s
|
2019-01-20 11:41:08 +08:00
|
|
|
|
2019-06-01 20:38:56 +08:00
|
|
|
; CHECK: ld {{r[0-9]+}}, [[PTR:[XYZ]]]
|
2019-01-20 11:41:08 +08:00
|
|
|
; CHECK: ldd {{r[0-9]+}}, [[PTR]]+1
|
2019-06-01 20:38:56 +08:00
|
|
|
; CHECK: st [[PTR2:[XYZ]]], {{r[0-9]+}}
|
|
|
|
; CHECK: std [[PTR2]]+1, {{r[0-9]+}}
|
2019-01-20 11:41:08 +08:00
|
|
|
define void @load_store_16(i16* nocapture %ptr) local_unnamed_addr #1 {
|
|
|
|
entry:
|
|
|
|
%0 = load i16, i16* %ptr, align 2
|
|
|
|
%add = add i16 %0, 5
|
|
|
|
store i16 %add, i16* %ptr, align 2
|
|
|
|
ret void
|
|
|
|
}
|