[PATCH] D47979: [X86] Lowering Mask Scalar add/sub/mul/div intrinsics to native IR (Clang part)
Tomasz Krupa via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 10 07:38:01 PDT 2018
tkrupa added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:9926
+ Value *Div = Builder.CreateFDiv(A, B);
+ llvm::VectorType *MaskTy = llvm::VectorType::get(Builder.getInt1Ty(),
+ cast<IntegerType>(Mask->getType())->getBitWidth());
----------------
craig.topper wrote:
> Can we just emit the and+icmp that the other operations end up with?
We can't - if select condition is a CmpInst, CodeGenPrepare::optimizeSelectInst replaces it with a branch condition in case of expensive operations such as div. That's the reason I'm handling it in CGBuiltin in the first place.
Repository:
rC Clang
https://reviews.llvm.org/D47979
More information about the cfe-commits
mailing list