blob: db1ab33fa883cd19333769c7de20d74e172f2be8 [file] [log] [blame]
Dylan McKay80463fe2017-12-09 06:45:36 +00001; RUN: llc -mattr=addsubiw < %s -march=avr | FileCheck %s
2
3; This verifies that the middle end can handle an unaligned atomic load.
4;
5; In the past, an assertion inside the SelectionDAGBuilder would always
6; hit an assertion for unaligned loads and stores.
7
8%AtomicI16 = type { %CellI16, [0 x i8] }
9%CellI16 = type { i16, [0 x i8] }
10
11; CHECK-LABEL: foo
12; CHECK: ret
13define void @foo(%AtomicI16* %self) {
14start:
15 %a = getelementptr inbounds %AtomicI16, %AtomicI16* %self, i16 0, i32 0, i32 0
16 load atomic i16, i16* %a seq_cst, align 1
17 ret void
18}
19