[clang] [llvm] [CIR] X86 vector masked load builtins (PR #169464)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 2 02:24:27 PST 2026
woruyu wrote:
> @woruyu Are you able to follow up on this?
I want to ask some quetion before writing code:
```c++
// curent - llvm
@llvm.masked.load (ptr, mask, passthru) --- three args
// curent - cir
mlir::Value createMaskedLoad(mlir::Location loc, mlir::Type ty,
mlir::Value ptr, llvm::Align alignment,
mlir::Value mask, mlir::Value passThru) {
....
mlir::Value ops[] = {ptr, this->getUInt32(int32_t(alignment.value()), loc),
mask, passThru};
return cir::LLVMIntrinsicCallOp::create(
*this, loc, getStringAttr("masked.load"), ty, ops)
.getResult();
}
--- ops = (ptr, align, mask, passThru) --- four args
case X86::BI__builtin_ia32_loaddqudi512_mask:
return emitX86MaskedLoad(builder, ops, llvm::Align(1),
getLoc(expr->getExprLoc()));
```
you can see that the extra align operand is default align(1), which is useless as argument, so Is just deleting align arg better choice than redefining mask op in cir and writing lowering code for it.
https://github.com/llvm/llvm-project/pull/169464
More information about the cfe-commits
mailing list