1; RUN: llc -mtriple=arm64-apple-ios7.0 -verify-machineinstrs -o - %s | FileCheck %s 2 3%struct = type { i32, i128, i8 } 4 5@var = global %struct zeroinitializer 6 7define i64 @check_size() { 8; CHECK-LABEL: check_size: 9 %starti = ptrtoint %struct* @var to i64 10 11 %endp = getelementptr %struct* @var, i64 1 12 %endi = ptrtoint %struct* %endp to i64 13 14 %diff = sub i64 %endi, %starti 15 ret i64 %diff 16; CHECK: {{movz x0, #48|orr w0, wzr, #0x30}} 17} 18 19define i64 @check_field() { 20; CHECK-LABEL: check_field: 21 %starti = ptrtoint %struct* @var to i64 22 23 %endp = getelementptr %struct* @var, i64 0, i32 1 24 %endi = ptrtoint i128* %endp to i64 25 26 %diff = sub i64 %endi, %starti 27 ret i64 %diff 28; CHECK: {{movz x0, #16|orr w0, wzr, #0x10}} 29} 30