[clang] [CIR][CIRGen][Builtin][X86] Compress Store Intrinsics (PR #169648)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Fri May 8 10:54:58 PDT 2026


================
@@ -86,6 +86,17 @@ static mlir::Value getMaskVecValue(CIRGenBuilderTy &builder, mlir::Location loc,
   return maskVec;
 }
 
+static mlir::Value emitX86CompressStore(CIRGenBuilderTy &builder,
+                                        mlir::Location loc,
+                                        ArrayRef<mlir::Value> ops) {
+  auto resultTy = cast<cir::VectorType>(ops[1].getType());
+  mlir::Value maskValue =
+      getMaskVecValue(builder, loc, ops[2], resultTy.getSize());
+  mlir::Value ptr = ops[0];
+  return emitIntrinsicCallOp(builder, loc, "masked_compressstore", resultTy,
+                             mlir::ValueRange{ops[1], ptr, maskValue});
----------------
andykaylor wrote:

```suggestion
  return emitIntrinsicCallOp(builder, loc, "masked_compressstore", resultTy,
                             mlir::ValueRange{ops[1], ops[0], maskValue});
```

https://github.com/llvm/llvm-project/pull/169648


More information about the cfe-commits mailing list