[clang] [CIR][X86]Implement handling for Select/Selectsh builtins in CIR (PR #174003)
Priyanshu Kumar via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 18 04:49:15 PST 2026
================
@@ -487,6 +487,37 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return createAddrSpaceCast(src.getLoc(), src, newTy);
}
+ //===--------------------------------------------------------------------===//
+ // Other Instructions
+ //===--------------------------------------------------------------------===//
+
+ mlir::Value createExtractElement(mlir::Location loc, mlir::Value vec,
+ mlir::Value idx) {
+ auto vecTy = mlir::cast<cir::VectorType>(vec.getType());
+ mlir::Type eltTy = vecTy.getElementType();
+ return cir::VecExtractOp::create(*this, loc, eltTy, vec, idx);
----------------
Priyanshu3820 wrote:
I had done it initially because i was having some compilation error somewhere. Fixed that and forgot to change this. Yes, the element type is automatically matched through the `TypesMatchWith` constraint. Fixed it now.
https://github.com/llvm/llvm-project/pull/174003
More information about the cfe-commits
mailing list