@@ -670,29 +670,6 @@ mlir::LogicalResult CIRToLLVMASinOpLowering::matchAndRewrite(
670670 return mlir::success ();
671671}
672672
673- mlir::LogicalResult CIRToLLVMLLVMIntrinsicCallOpLowering::matchAndRewrite (
674- cir::LLVMIntrinsicCallOp op, OpAdaptor adaptor,
675- mlir::ConversionPatternRewriter &rewriter) const {
676- mlir::Type llvmResTy =
677- getTypeConverter ()->convertType (op->getResultTypes ()[0 ]);
678- if (!llvmResTy)
679- return op.emitError (" expected LLVM result type" );
680- StringRef name = op.getIntrinsicName ();
681- // Some llvm intrinsics require ElementType attribute to be attached to
682- // the argument of pointer type. That prevents us from generating LLVM IR
683- // because from LLVM dialect, we have LLVM IR like the below which fails
684- // LLVM IR verification.
685- // %3 = call i64 @llvm.aarch64.ldxr.p0(ptr %2)
686- // The expected LLVM IR should be like
687- // %3 = call i64 @llvm.aarch64.ldxr.p0(ptr elementtype(i32) %2)
688- // TODO(cir): MLIR LLVM dialect should handle this part as CIR has no way
689- // to set LLVM IR attribute.
690- assert (!cir::MissingFeatures::llvmIntrinsicElementTypeSupport ());
691- replaceOpWithCallLLVMIntrinsicOp (rewriter, op, " llvm." + name, llvmResTy,
692- adaptor.getOperands ());
693- return mlir::success ();
694- }
695-
696673mlir::LogicalResult CIRToLLVMAssumeOpLowering::matchAndRewrite (
697674 cir::AssumeOp op, OpAdaptor adaptor,
698675 mlir::ConversionPatternRewriter &rewriter) const {
0 commit comments