[all-commits] [llvm/llvm-project] 14742f: [PowerPC] Truncate exponent parameter for vec_cts, ...

Zarko Todorovski via All-commits all-commits at lists.llvm.org
Tue Jul 11 08:52:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14742f2a689c825adebc54cbade9c89fbe426da8
      https://github.com/llvm/llvm-project/commit/14742f2a689c825adebc54cbade9c89fbe426da8
  Author: Zarko Todorovski <zarko at ca.ibm.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M clang/lib/Headers/altivec.h
    A clang/test/CodeGen/ppc-vec_ct-truncate.c

  Log Message:
  -----------
  [PowerPC] Truncate exponent parameter for vec_cts,vec_ctf

On PowerPC, the vec_ct* builtin function take the form of eg. d=vec_cts(a,b)
LLVM (llc) will crash when a user specifies a number out of the allowed range
(0-31) for b.This patch truncates b so that we avoid the backend crash in some cases.

Further documentation for the builtins can be found here:
https://www.ibm.com/docs/en/xl-c-and-cpp-linux/16.1.0?topic=functions-vec-ctf
https://www.ibm.com/docs/en/xl-c-and-cpp-linux/16.1.0?topic=functions-vec-cts

Reviewed By: nemanjai, #powerpc

Differential Revision: https://reviews.llvm.org/D106409




More information about the All-commits mailing list