[PATCH] D82359: [Power10] Implement Vector Replace Builtins in LLVM/Clang
Biplob Mishra via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 23:57:32 PDT 2020
biplmish marked an inline comment as done.
biplmish added inline comments.
================
Comment at: clang/lib/Headers/altivec.h:16839
+ (__b), signed int \
+ : (vector signed int)__builtin_altivec_vinsw((signed int)(__b), \
+ (12 - ((__c)*4))), \
----------------
steven.zhang wrote:
> I see that the value range for __c is 0, 3. Could you add some semantic check in frontend about this?
Yes value of __c should actually be 0.3 for 32 bit type and 0,1 for 64bit type. Also this is converted to a byte index as input to builtin as specified. So a range check for builtin input would be 0-12 for 32 bit type and 0-8 for 64 bit type.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82359/new/
https://reviews.llvm.org/D82359
More information about the llvm-commits
mailing list