Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenObjCXX / message-reference.mm
blobbc36933e94b088fd6278da696bc686a75acea98a
1 // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
3 @interface I {}
4 -(unsigned int&)referenceCount;
5 @end
7 @interface MyClass
8 +(int)writeBlip:(I*)srcBlip;
9 @end
11 @implementation MyClass
12 +(int)writeBlip:(I*)srcBlip{
13   return ([srcBlip referenceCount] == 0);
15 @end
17 // CHECK: [[T:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @objc_msgSend
18 // CHECK: [[U:%.*]] = load i32, ptr [[T]]
19 // CHECK: [[V:%.*]] = icmp eq i32 [[U]], 0