[clang] [CIR][X86]Implement handling for Select/Selectsh builtins in CIR (PR #174003)
Priyanshu Kumar via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 21 20:07:54 PST 2026
================
@@ -487,6 +487,34 @@ 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) {
+ return cir::VecExtractOp::create(*this, loc, vec, idx);
+ }
+
+ mlir::Value createExtractElement(mlir::Location loc, mlir::Value vec,
+ uint64_t idx) {
+ mlir::Value idxVal =
+ getConstAPInt(loc, getUIntNTy(64), llvm::APInt(64, idx));
+ return cir::VecExtractOp::create(*this, loc, vec, idxVal);
+ }
+
+ mlir::Value createInsertElement(mlir::Location loc, mlir::Value vec,
----------------
Priyanshu3820 wrote:
Removed
https://github.com/llvm/llvm-project/pull/174003
More information about the cfe-commits
mailing list