# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
# RUN: llc -mtriple aarch64-apple-darwin -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
--- |
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
target triple = "arm64-apple-macosx13.5.0"
%struct.wibble = type <{ [500 x %struct.wobble], [500 x %struct.wobble], [500 x %struct.wobble], [500 x %struct.wobble], [500 x %struct.wobble], i32, i32, i32, i32, i32, i32, %struct.baz, float, float, float, float, float, [4 x i8] }>
%struct.wobble = type { [4 x float] }
%struct.baz = type { %struct.foo }
%struct.foo = type { i64, i32 }
@global = global %struct.wibble zeroinitializer
define void @wibble() {
ret void
}
...
---
name: wibble
body: |
bb.1:
; CHECK-LABEL: name: wibble
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
; CHECK-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @global + 40004
; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[GV]], [[C1]](s64)
; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C]](s32), [[C]](s32), [[C]](s32), [[C]](s32)
; CHECK-NEXT: G_STORE [[C]](s32), [[PTR_ADD]](p0) :: (store (s32) into `ptr getelementptr inbounds (%struct.wibble, ptr @global, i64 0, i32 10)`)
; CHECK-NEXT: G_STORE [[BUILD_VECTOR]](<4 x s32>), [[GV]](p0) :: (store (<4 x s32>) into `ptr getelementptr inbounds (%struct.wibble, ptr @global, i64 0, i32 6)`, align 4)
; CHECK-NEXT: RET_ReallyLR
%0:_(s32) = G_CONSTANT i32 0
%2:_(p0) = G_GLOBAL_VALUE @global
%3:_(s64) = G_CONSTANT i64 40020
%1:_(p0) = G_PTR_ADD %2, %3(s64)
%4:_(<4 x s32>) = G_BUILD_VECTOR %0(s32), %0(s32), %0(s32), %0(s32)
%6:_(s64) = G_CONSTANT i64 40004
%5:_(p0) = G_PTR_ADD %2, %6(s64)
G_STORE %0(s32), %1(p0) :: (store (s32) into `ptr getelementptr inbounds (%struct.wibble, ptr @global, i64 0, i32 10)`)
G_STORE %4(<4 x s32>), %5(p0) :: (store (<4 x s32>) into `ptr getelementptr inbounds (%struct.wibble, ptr @global, i64 0, i32 6)`, align 4)
RET_ReallyLR
...