1 ; RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s
3 ; This file contains tests for the AArch64 load/store optimizer.
5 %struct.A = type { %struct.B, %struct.C }
6 %struct.B = type { i8*, i8*, i8*, i8* }
7 %struct.C = type { i32, i32 }
9 ; Check the following transform:
17 define void @foo(%struct.A* %ptr) nounwind {
19 ; CHECK: ldr w{{[0-9]+}}, [x{{[0-9]+}}, #32]!
21 %a = getelementptr inbounds %struct.A* %ptr, i64 0, i32 1, i32 0
22 %add = load i32* %a, align 4
25 %c = getelementptr inbounds %struct.A* %ptr, i64 0, i32 1
26 tail call void @bar(%struct.C* %c, i32 %add)
30 declare void @bar(%struct.C*, i32)