From a552664ed764b2066dfb6c34fe62e702d9ae6eee Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 16 Aug 2022 05:57:07 +0200 Subject: synth-vhdl_expr: optimize record with one element. --- src/synth/synth-vhdl_expr.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/synth') diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb index a7cb5f5d0..a16b8c066 100644 --- a/src/synth/synth-vhdl_expr.adb +++ b/src/synth/synth-vhdl_expr.adb @@ -2034,9 +2034,9 @@ package body Synth.Vhdl_Expr is Res_Typ.Sz); return Res; else - N := Build_Extract (Ctxt, Get_Net (Ctxt, Val), - Val.Typ.Rec.E (Idx + 1).Offs.Net_Off, - Get_Type_Width (Res_Typ)); + N := Build2_Extract (Ctxt, Get_Net (Ctxt, Val), + Val.Typ.Rec.E (Idx + 1).Offs.Net_Off, + Get_Type_Width (Res_Typ)); Set_Location (N, Expr); return Create_Value_Net (N, Res_Typ); end if; -- cgit v1.2.3