[all-commits] [llvm/llvm-project] 6b136b: [Power10] Implement custom codegen for the vec_re...
Amy Kwan via All-commits
all-commits at lists.llvm.org
Wed Sep 23 20:55:51 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 6b136b19cbe4e96adea63b75f1f2f76ec25c708e
https://github.com/llvm/llvm-project/commit/6b136b19cbe4e96adea63b75f1f2f76ec25c708e
Author: Amy Kwan <amy.kwan1 at ibm.com>
Date: 2020-09-23 (Wed, 23 Sep 2020)
Changed paths:
M clang/include/clang/Basic/BuiltinsPPC.def
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/lib/Headers/altivec.h
M clang/lib/Sema/SemaChecking.cpp
M clang/test/CodeGen/builtins-ppc-p10vector.c
A clang/test/CodeGen/builtins-ppc-vec-ins-error.c
Log Message:
-----------
[Power10] Implement custom codegen for the vec_replace_elt and vec_replace_unaligned builtins.
This patch implements custom codegen for the vec_replace_elt and
vec_replace_unaligned builtins.
These builtins map to the @llvm.ppc.altivec.vinsw and @llvm.ppc.altivec.vinsd
intrinsics depending on the arguments. The main motivation for doing custom
codegen for these intrinsics is because there are float and double versions of
the builtin. Normally, the converting the float to an integer would be done via
fptoui in the IR. This is incorrect as fptoui truncates the value and we must
ensure the value is not truncated. Therefore, we provide custom codegen to utilize
bitcast instead as bitcasts do not truncate.
Differential Revision: https://reviews.llvm.org/D83500
More information about the All-commits
mailing list