blob: 081eab81e905a610cccac3fe636eee2d6cc7a9a2 [file] [log] [blame]
James Molloy90d61012014-08-29 10:17:52 +00001// RUN: %clang_cc1 -triple aarch64_be-linux-gnu -ffreestanding -emit-llvm -O0 -o - %s | FileCheck --check-prefix IR %s
James Molloy491cefb2014-05-07 17:41:15 +00002
3struct bt3 { signed b2:10; signed b3:10; } b16;
4
James Molloy90d61012014-08-29 10:17:52 +00005// Get the high 32-bits and then shift appropriately for big-endian.
James Molloy491cefb2014-05-07 17:41:15 +00006signed callee_b0f(struct bt3 bp11) {
James Molloy90d61012014-08-29 10:17:52 +00007// IR: callee_b0f(i64 [[ARG:%.*]])
Ulrich Weigand6e2cea62015-07-10 11:31:43 +00008// IR: store i64 [[ARG]], i64* [[PTR:%.*]], align 8
James Molloy90d61012014-08-29 10:17:52 +00009// IR: [[BITCAST:%.*]] = bitcast i64* [[PTR]] to i8*
Pete Cooper3b39e882015-11-19 05:55:59 +000010// IR: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* [[BITCAST]], i64 4
James Molloy491cefb2014-05-07 17:41:15 +000011 return bp11.b2;
12}