1 // RUN: %clang_cc1 -fpass-by-value-is-noalias -triple arm64-apple-iphoneos -emit-llvm -disable-llvm-optzns -fobjc-runtime-has-weak -fobjc-arc -fobjc-dispatch-method=mixed %s -o - 2>&1 | FileCheck --check-prefix=WITH_NOALIAS %s
2 // RUN: %clang_cc1 -triple arm64-apple-iphoneos -emit-llvm -disable-llvm-optzns -fobjc-runtime-has-weak -fobjc-arc -fobjc-dispatch-method=mixed %s -o - 2>&1 | FileCheck --check-prefix=NO_NOALIAS %s
8 // A struct large enough so it is not passed in registers on ARM64, but with a
9 // weak reference, so noalias should not be added even with
10 // -fpass-by-value-is-noalias.
20 // WITH_NOALIAS: define{{.*}} void @take(%struct.Foo* noundef %arg)
21 // NO_NOALIAS: define{{.*}} void @take(%struct.Foo* noundef %arg)
22 void take(struct Foo arg) {}