[all-commits] [llvm/llvm-project] 149884: [SystemZ] Fix codegen for _[u]128 intrinsics

Ulrich Weigand via All-commits all-commits at lists.llvm.org
Thu Oct 10 23:03:46 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 149884a1469d83720ea524763fdf461a74af8ecb
      https://github.com/llvm/llvm-project/commit/149884a1469d83720ea524763fdf461a74af8ecb
  Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M clang/lib/Headers/vecintrin.h
    A clang/test/CodeGen/SystemZ/builtins-systemz-i128.c

  Log Message:
  -----------
  [SystemZ] Fix codegen for _[u]128 intrinsics

PR #74625 introduced a regression in the code generated for the
following set of intrinsic:
  vec_add_u128, vec_addc_u128, vec_adde_u128, vec_addec_u128
  vec_sub_u128, vec_subc_u128, vec_sube_u128, vec_subec_u128
  vec_sum_u128, vec_msum_u128
  vec_gfmsum_128, vec_gfmsum_accum_128

This is because the new code incorrectly assumed that a cast
from "unsigned __int128" to "vector unsigned char" would simply
be a bitcast re-interpretation; instead, this cast actually
truncates the __int128 to char and splats the result.

Fixed by adding an intermediate cast via a single-element
128-bit integer vector.

Fixes: https://github.com/llvm/llvm-project/issues/109113
(cherry picked from commit baf9b7da81025c1e3b0704d7ecf667e06f95642b)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list