Skip to content

Commit 8f0c673

Browse files
committed
[MLIR] fix arith dialect build failure
Missing function defs causes errors on some build configs.
1 parent f6a561c commit 8f0c673

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

mlir/lib/Dialect/Arithmetic/IR/ArithmeticOps.cpp

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,55 @@ OpFoldResult arith::ExtSIOp::fold(ArrayRef<Attribute> operands) {
493493
return {};
494494
}
495495

496+
// TODO temporary fixes until second patch is in
497+
OpFoldResult arith::TruncFOp::fold(ArrayRef<Attribute> operands) {
498+
return {};
499+
}
500+
501+
bool arith::TruncFOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
502+
return true;
503+
}
504+
505+
OpFoldResult arith::TruncIOp::fold(ArrayRef<Attribute> operands) {
506+
return {};
507+
}
508+
509+
bool arith::TruncIOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
510+
return true;
511+
}
512+
513+
bool arith::ExtUIOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
514+
return true;
515+
}
516+
517+
bool arith::ExtSIOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
518+
return true;
519+
}
520+
521+
bool arith::ExtFOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
522+
return true;
523+
}
524+
525+
OpFoldResult arith::ConstantOp::fold(ArrayRef<Attribute> operands) {
526+
return {};
527+
}
528+
529+
bool arith::SIToFPOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
530+
return true;
531+
}
532+
533+
bool arith::UIToFPOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
534+
return true;
535+
}
536+
537+
bool arith::FPToSIOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
538+
return true;
539+
}
540+
541+
bool arith::FPToUIOp::areCastCompatible(TypeRange inputs, TypeRange outputs) {
542+
return true;
543+
}
544+
496545
//===----------------------------------------------------------------------===//
497546
// IndexCastOp
498547
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)