[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR
Gabor Buella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 13 10:11:53 PDT 2018
GBuella added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:10090-10100
+ // _CMP_TRUE_UQ, _CMP_TRUE_US produce -1,-1... vector
+ // on any input and _CMP_FALSE_OQ, _CMP_FALSE_OS produce 0, 0...
+ if (CC == 0xf || CC == 0xb || CC == 0x1b || CC == 0x1f) {
+ llvm::Type *ResultType = ConvertType(E->getType());
+
+ Value *Constant = (CC == 0xf || CC == 0x1f) ?
+ llvm::Constant::getAllOnesValue(ResultType) :
----------------
spatel wrote:
> llvm::Type *ResultType = ConvertType(E->getType());
> if (CC == 0x0f || CC == 0x1f)
> return llvm::Constant::getAllOnesValue(ResultType);
> if (CC == 0x0b || CC == 0x1b)
> return llvm::Constant::getNullValue(ResultType);
>
> ?
>
> Also, can we use the defined predicate names instead of hex values in this code?
Well, I believe we would need to predefine them first.
I only found those in the client header `avxintrin.h`.
https://reviews.llvm.org/D45616
More information about the cfe-commits
mailing list