Excerpts from Iain Sandoe's message of November 1, 2026 6:26 pm:
> This shows, for example, on cascadelake.
> Tested on x86_64-linux (cfarm151) and darwin both with cascadelake CPUs.
> OK for trunk?
> thanks
> Iain
> 
> --- 8< ---
> 
> build_boolop types the VEC_COND_EXPR result with the comparison's mask type
> instead of a same-width integral vector. Where the target has AVX512 mask 
> registers
> (avx512vl) that type is 32x narrower than the operands, and D's same-size 
> rule then
> rejects the reinterpretation.
> 
> The solution is to copy the approach used in the C/C++ frontends, where a 
> separate
> return type is computed, the patch here essentially duplicates those actions.
> 
> gcc/d/ChangeLog:
> 
>       * d-codegen.cc (build_vec_cmp): New.
>       (build_boolop): Where required compute a separate return type for vector
>       boolean ops.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gdc.dg/pr108945.d: Actully test for the absence of the floating
>       point constant, instead of using VEC_COND_EXPR; the latter is now
>       validly emitted.
> 
> Signed-off-by: Iain Sandoe <[email protected]>
> ---
>  gcc/d/d-codegen.cc              | 46 +++++++++++++++++++++++----------
>  gcc/testsuite/gdc.dg/pr108945.d |  2 +-
>  2 files changed, 34 insertions(+), 14 deletions(-)
> 

OK.

Thanks Iain!

Reply via email to