[Clang][PowerPC] Add max/min intrinsics to Clang and PPC backend
authorTing Wang <Ting.Wang.SH@ibm.com>
Wed, 6 Apr 2022 02:43:48 +0000 (22:43 -0400)
committerTing Wang <Ting.Wang.SH@ibm.com>
Wed, 6 Apr 2022 02:43:48 +0000 (22:43 -0400)
commitb389354b285744f700fd9372c8707fa056d7cb37
tree90908f00aca761fea36e88ada064a69dbe64f255
parent634bf829a8d289371d5b5a50b787596124228898
[Clang][PowerPC] Add max/min intrinsics to Clang and PPC backend

Add support for builtin_[max|min] which has below prototype:
A builtin_max (A1, A2, A3, ...)
All arguments must have the same type; they must all be float, double, or long double.
Internally use SelectCC to get the result.

Reviewed By: qiucf

Differential Revision: https://reviews.llvm.org/D122478
clang/include/clang/Basic/BuiltinsPPC.def
clang/lib/Basic/Targets/PPC.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/PowerPC/builtins-ppc.c
clang/test/Sema/builtins-ppc.c
llvm/include/llvm/IR/IntrinsicsPowerPC.td
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-maxmin.ll [new file with mode: 0644]