File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
middle_end/flambda2/simplify Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -287,11 +287,21 @@ let rebuild_switch_with_single_arg_to_same_destination uacc ~dacc_before_switch
287
287
in
288
288
let uacc =
289
289
let fields = List. map Field_of_static_block. tagged_immediate consts in
290
+ let block_type =
291
+ T. immutable_block ~is_unique: false Tag. zero ~field_kind: K. value
292
+ Alloc_mode.For_types. heap
293
+ ~fields:
294
+ (List. map
295
+ (fun const ->
296
+ T. alias_type_of K. value
297
+ (Simple. const (Reg_width_const. const_int const)))
298
+ consts)
299
+ in
290
300
UA. add_lifted_constant uacc
291
301
(LC. create_definition
292
302
(LC.Definition. block_like
293
303
(DA. denv dacc_before_switch)
294
- block_sym T. any_block ~symbol_projections: Variable.Map. empty
304
+ block_sym block_type ~symbol_projections: Variable.Map. empty
295
305
(RSC. create_block rebuilding tag Immutable ~fields )))
296
306
in
297
307
(* CR mshinwell: consider sharing the constants *)
You can’t perform that action at this time.
0 commit comments