1 ; RUN: llc < %s -mtriple=lanai-unknown-unknown | FileCheck %s
3 ; Test scheduling of subwords.
5 %struct.X = type { i16, i16 }
7 define void @f(%struct.X* inreg nocapture %c) #0 {
9 %a = getelementptr inbounds %struct.X, %struct.X* %c, i32 0, i32 0
10 %0 = load i16, i16* %a, align 2
12 store i16 %inc, i16* %a, align 2
13 %b = getelementptr inbounds %struct.X, %struct.X* %c, i32 0, i32 1
14 %1 = load i16, i16* %b, align 2
16 store i16 %dec, i16* %b, align 2
20 ; Verify that the two loads occur before the stores. Without memory
21 ; disambiguation and subword schedule, the resultant code was a per subword
22 ; load-modify-store sequence instead of the more optimal schedule where all
23 ; loads occurred before modification and storage.