 // RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s
-// RUN: %target-swift-frontend -emit-silgen -enable-guaranteed-self %s | FileCheck %s --check-prefix=GUARANTEED
 
 public protocol P1 {
   func reqP1a()

  // CHECK: apply [[METHOD]]<{{.*}}>([[VALUE]])
  // CHECK-NOT: strong_release [[VALUE]]
  // CHECK-NOT: strong_release %0

  // GUARANTEED-NOT: strong_retain %0
  // GUARANTEED: [[VALUE:%.*]] = open_existential_ref %0
  // GUARANTEED: [[METHOD:%.*]] = function_ref
  // GUARANTEED: apply [[METHOD]]<{{.*}}>([[VALUE]])
  // GUARANTEED-NOT: strong_release [[VALUE]]
  // GUARANTEED-NOT: strong_release %0
  guaranteed.f1()

  // CHECK: [[IMMEDIATE:%.*]] = load [[IMMEDIATE_BOX]]

func plusOneCP1() -> CP1 {}

// CHECK-LABEL: sil hidden @_TF19protocol_extensions37test_open_existential_semantics_classFTPS_3CP1_PS0___T_
func test_open_existential_semantics_class(guaranteed: CP1,
                                           var immediate: CP1) {
  // CHECK: [[IMMEDIATE_BOX:%.*]] = alloc_box $CP1

  // CHECK-NOT: strong_retain %0
  // CHECK: [[VALUE:%.*]] = open_existential_ref %0
