remove switch statement in vector8_shift_{left,right}

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: johncnaylorls(at)gmail(dot)com
Subject: remove switch statement in vector8_shift_{left,right}
Date: 2026-07-02 00:32:16
Message-ID: akWxkA-mszMm57cV@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In commit ec8719ccbf, I added a switch statement with all expected shift
counts for vector8_shift_{left,right} because AArch64's vshlq_n_u32 and
vshrq_n_u32 require an integer literal. I discovered that we can use
vshlq_u32 instead for both cases, which avoids the need for the switch
statement and compiles to the same machine code on recent gcc/clang.

--
nathan

Attachment Content-Type Size
v1-0001-remove-switch-statement-in-vector8_shift_-left-ri.patch text/plain 2.2 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-07-02 00:37:43 Re: Add pg_stat_kind_info system view
Previous Message Sami Imseih 2026-07-02 00:26:23 Re: Add pg_stat_kind_info system view