Skip to content

Commit 071e55b

Browse files
authored
[CIR][NFS] Remove unnecessary constraints asserts in VecCmpOp (llvm#142473)
We already have constraints in CIROps to make sure that the operands and result type are vectors [VecCmpOp](https://github.com/llvm/llvm-project/blob/b88dfb0b23d0a1863414fb9450ee444766bfe7c9/clang/include/clang/CIR/Dialect/IR/CIROps.td#L2149-L2151)
1 parent 45c2974 commit 071e55b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,10 +1858,6 @@ mlir::LogicalResult CIRToLLVMVecInsertOpLowering::matchAndRewrite(
18581858
mlir::LogicalResult CIRToLLVMVecCmpOpLowering::matchAndRewrite(
18591859
cir::VecCmpOp op, OpAdaptor adaptor,
18601860
mlir::ConversionPatternRewriter &rewriter) const {
1861-
assert(mlir::isa<cir::VectorType>(op.getType()) &&
1862-
mlir::isa<cir::VectorType>(op.getLhs().getType()) &&
1863-
mlir::isa<cir::VectorType>(op.getRhs().getType()) &&
1864-
"Vector compare with non-vector type");
18651861
mlir::Type elementType = elementTypeIfVector(op.getLhs().getType());
18661862
mlir::Value bitResult;
18671863
if (auto intType = mlir::dyn_cast<cir::IntType>(elementType)) {

0 commit comments

Comments
 (0)