22// Exceptions. See /LICENSE for license information.
33// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44//
5+ // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
6+ // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
7+ //
58// AUTOUPDATE
69// TIP: To test this file alone, run:
710// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon
@@ -95,13 +98,13 @@ fn Main() {
9598// CHECK:STDOUT: !entry:
9699// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
97100// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
98- // CHECK:STDOUT: %bound_method.loc11_25 .1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04]
101+ // CHECK:STDOUT: %bound_method.loc14_25 .1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound.d04]
99102// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
100- // CHECK:STDOUT: %bound_method.loc11_25 .2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e]
101- // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc11_25 .2(%int_0) [concrete = constants.%int_0.6a9]
102- // CHECK:STDOUT: %.loc11_25 .1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
103- // CHECK:STDOUT: %.loc11_25 .2: %i32 = converted %int_0, %.loc11_25 .1 [concrete = constants.%int_0.6a9]
104- // CHECK:STDOUT: return %.loc11_25 .2
103+ // CHECK:STDOUT: %bound_method.loc14_25 .2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.b6e]
104+ // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_25 .2(%int_0) [concrete = constants.%int_0.6a9]
105+ // CHECK:STDOUT: %.loc14_25 .1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
106+ // CHECK:STDOUT: %.loc14_25 .2: %i32 = converted %int_0, %.loc14_25 .1 [concrete = constants.%int_0.6a9]
107+ // CHECK:STDOUT: return %.loc14_25 .2
105108// CHECK:STDOUT: }
106109// CHECK:STDOUT:
107110// CHECK:STDOUT: fn @Main() {
@@ -113,27 +116,27 @@ fn Main() {
113116// CHECK:STDOUT: %a.var: ref %i32 = var %a.var_patt
114117// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
115118// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
116- // CHECK:STDOUT: %bound_method.loc14_3 .1: <bound method> = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b30]
119+ // CHECK:STDOUT: %bound_method.loc17_3 .1: <bound method> = bound_method %int_3, %impl.elem0 [concrete = constants.%Convert.bound.b30]
117120// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
118- // CHECK:STDOUT: %bound_method.loc14_3 .2: <bound method> = bound_method %int_3, %specific_fn [concrete = constants.%bound_method.047]
119- // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc14_3 .2(%int_3) [concrete = constants.%int_3.822]
120- // CHECK:STDOUT: %.loc14_3 : init %i32 = converted %int_3, %int.convert_checked [concrete = constants.%int_3.822]
121- // CHECK:STDOUT: assign %a.var, %.loc14_3
122- // CHECK:STDOUT: %.loc14_10 : type = splice_block %i32 [concrete = constants.%i32] {
121+ // CHECK:STDOUT: %bound_method.loc17_3 .2: <bound method> = bound_method %int_3, %specific_fn [concrete = constants.%bound_method.047]
122+ // CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc17_3 .2(%int_3) [concrete = constants.%int_3.822]
123+ // CHECK:STDOUT: %.loc17_3 : init %i32 = converted %int_3, %int.convert_checked [concrete = constants.%int_3.822]
124+ // CHECK:STDOUT: assign %a.var, %.loc17_3
125+ // CHECK:STDOUT: %.loc17_10 : type = splice_block %i32 [concrete = constants.%i32] {
123126// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
124127// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
125128// CHECK:STDOUT: }
126129// CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var
127- // CHECK:STDOUT: %a.ref.loc19_3 : ref %i32 = name_ref a, %a
128- // CHECK:STDOUT: %a.ref.loc19_7 : ref %i32 = name_ref a, %a
129- // CHECK:STDOUT: %a.ref.loc19_10 : ref %i32 = name_ref a, %a
130- // CHECK:STDOUT: %.loc19 : %i32 = bind_value %a.ref.loc19_10
131- // CHECK:STDOUT: assign %a.ref.loc19_3 , %.loc19
132- // CHECK:STDOUT: %a.ref.loc24_3 : ref %i32 = name_ref a, %a
133- // CHECK:STDOUT: %a.ref.loc24_7 : ref %i32 = name_ref a, %a
130+ // CHECK:STDOUT: %a.ref.loc22_3 : ref %i32 = name_ref a, %a
131+ // CHECK:STDOUT: %a.ref.loc22_7 : ref %i32 = name_ref a, %a
132+ // CHECK:STDOUT: %a.ref.loc22_10 : ref %i32 = name_ref a, %a
133+ // CHECK:STDOUT: %.loc22 : %i32 = bind_value %a.ref.loc22_10
134+ // CHECK:STDOUT: assign %a.ref.loc22_3 , %.loc22
135+ // CHECK:STDOUT: %a.ref.loc27_3 : ref %i32 = name_ref a, %a
136+ // CHECK:STDOUT: %a.ref.loc27_7 : ref %i32 = name_ref a, %a
134137// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
135138// CHECK:STDOUT: %F.call: init %i32 = call %F.ref()
136- // CHECK:STDOUT: assign %a.ref.loc24_3 , %F.call
139+ // CHECK:STDOUT: assign %a.ref.loc27_3 , %F.call
137140// CHECK:STDOUT: return
138141// CHECK:STDOUT: }
139142// CHECK:STDOUT:
0 commit comments