================
@@ -168,6 +168,62 @@ static mlir::Value emitVecInsert(CIRGenBuilderTy &builder,
mlir::Location loc,
return cir::VecInsertOp::create(builder, loc, vec, value, indexVal);
}
+static mlir::Value emitX86vpcom(CIRGenBuilderTy &builder, mlir::Location loc,
+ llvm::SmallVector<mlir::Value> ops,
+ bool isSigned) {
+ mlir::Value op0 = ops[0];
+ mlir::Value op1 = ops[1];
+
+ cir::VectorType ty = cast<cir::VectorType>(op0.getType());
+ mlir::Type elementTy = ty.getElementType();
+
+ uint64_t imm =
+ ops[2].getDefiningOp<cir::ConstantOp>().getIntValue().getZExtValue() &
+ 0x7;
----------------
andykaylor wrote:
```suggestion
uint64_t imm = CIRGenFunction::getZExtIntValueFromConstOp(ops[2]) & 0x7;
```
This helper function was just added, so you'll need to rebase to get it.
https://github.com/llvm/llvm-project/pull/170362
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits