[PATCH] D45616: [X86] Lower _mm[256|512]_cmp[.]_mask intrinsics to native llvm IR
Sanjay Patel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 13 11:15:45 PDT 2018
spatel added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:10107-10112
+ case 0x0b: // FALSE_OQ
+ case 0x1b: // FALSE_OS
+ return llvm::Constant::getNullValue(ConvertType(E->getType()));
+ case 0x0f: // TRUE_UQ
+ case 0x1f: // TRUE_US
+ return llvm::Constant::getAllOnesValue(ConvertType(E->getType()));
----------------
On 2nd thought, why are we optimizing when we have matching IR predicates for these?
Just translate to FCMP_TRUE / FCMP_FALSE instead of special-casing these values.
InstSimplify can handle the constant folding if optimization is on.
https://reviews.llvm.org/D45616
More information about the cfe-commits
mailing list