Commit 14742f2a authored by Zarko Todorovski's avatar Zarko Todorovski
Browse files

[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
parent 5f8e6f0c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment