@@ -655,7 +655,7 @@ LogicalResult cir::CastOp::verify() {
655
655
auto resComplexTy = mlir::dyn_cast<cir::ComplexType>(resType);
656
656
if (!resComplexTy)
657
657
return emitOpError () << " requires !cir.complex type for result" ;
658
- if (srcType != resComplexTy.getElementTy ())
658
+ if (srcType != resComplexTy.getElementType ())
659
659
return emitOpError () << " requires source type match result element type" ;
660
660
return success ();
661
661
}
@@ -665,7 +665,7 @@ LogicalResult cir::CastOp::verify() {
665
665
auto resComplexTy = mlir::dyn_cast<cir::ComplexType>(resType);
666
666
if (!resComplexTy)
667
667
return emitOpError () << " requires !cir.complex type for result" ;
668
- if (srcType != resComplexTy.getElementTy ())
668
+ if (srcType != resComplexTy.getElementType ())
669
669
return emitOpError () << " requires source type match result element type" ;
670
670
return success ();
671
671
}
@@ -675,7 +675,7 @@ LogicalResult cir::CastOp::verify() {
675
675
return emitOpError () << " requires !cir.complex type for source" ;
676
676
if (!mlir::isa<cir::CIRFPTypeInterface>(resType))
677
677
return emitOpError () << " requires !cir.float type for result" ;
678
- if (srcComplexTy.getElementTy () != resType)
678
+ if (srcComplexTy.getElementType () != resType)
679
679
return emitOpError () << " requires source element type match result type" ;
680
680
return success ();
681
681
}
@@ -685,14 +685,14 @@ LogicalResult cir::CastOp::verify() {
685
685
return emitOpError () << " requires !cir.complex type for source" ;
686
686
if (!mlir::isa<cir::IntType>(resType))
687
687
return emitOpError () << " requires !cir.int type for result" ;
688
- if (srcComplexTy.getElementTy () != resType)
688
+ if (srcComplexTy.getElementType () != resType)
689
689
return emitOpError () << " requires source element type match result type" ;
690
690
return success ();
691
691
}
692
692
case cir::CastKind::float_complex_to_bool: {
693
693
auto srcComplexTy = mlir::dyn_cast<cir::ComplexType>(srcType);
694
694
if (!srcComplexTy ||
695
- !mlir::isa<cir::CIRFPTypeInterface>(srcComplexTy.getElementTy ()))
695
+ !mlir::isa<cir::CIRFPTypeInterface>(srcComplexTy.getElementType ()))
696
696
return emitOpError ()
697
697
<< " requires !cir.complex<!cir.float> type for source" ;
698
698
if (!mlir::isa<cir::BoolType>(resType))
@@ -701,7 +701,8 @@ LogicalResult cir::CastOp::verify() {
701
701
}
702
702
case cir::CastKind::int_complex_to_bool: {
703
703
auto srcComplexTy = mlir::dyn_cast<cir::ComplexType>(srcType);
704
- if (!srcComplexTy || !mlir::isa<cir::IntType>(srcComplexTy.getElementTy ()))
704
+ if (!srcComplexTy ||
705
+ !mlir::isa<cir::IntType>(srcComplexTy.getElementType ()))
705
706
return emitOpError ()
706
707
<< " requires !cir.complex<!cir.float> type for source" ;
707
708
if (!mlir::isa<cir::BoolType>(resType))
@@ -711,43 +712,47 @@ LogicalResult cir::CastOp::verify() {
711
712
case cir::CastKind::float_complex: {
712
713
auto srcComplexTy = mlir::dyn_cast<cir::ComplexType>(srcType);
713
714
if (!srcComplexTy ||
714
- !mlir::isa<cir::CIRFPTypeInterface>(srcComplexTy.getElementTy ()))
715
+ !mlir::isa<cir::CIRFPTypeInterface>(srcComplexTy.getElementType ()))
715
716
return emitOpError ()
716
717
<< " requires !cir.complex<!cir.float> type for source" ;
717
718
auto resComplexTy = mlir::dyn_cast<cir::ComplexType>(resType);
718
719
if (!resComplexTy ||
719
- !mlir::isa<cir::CIRFPTypeInterface>(resComplexTy.getElementTy ()))
720
+ !mlir::isa<cir::CIRFPTypeInterface>(resComplexTy.getElementType ()))
720
721
return emitOpError ()
721
722
<< " requires !cir.complex<!cir.float> type for result" ;
722
723
return success ();
723
724
}
724
725
case cir::CastKind::float_complex_to_int_complex: {
725
726
auto srcComplexTy = mlir::dyn_cast<cir::ComplexType>(srcType);
726
727
if (!srcComplexTy ||
727
- !mlir::isa<cir::CIRFPTypeInterface>(srcComplexTy.getElementTy ()))
728
+ !mlir::isa<cir::CIRFPTypeInterface>(srcComplexTy.getElementType ()))
728
729
return emitOpError ()
729
730
<< " requires !cir.complex<!cir.float> type for source" ;
730
731
auto resComplexTy = mlir::dyn_cast<cir::ComplexType>(resType);
731
- if (!resComplexTy || !mlir::isa<cir::IntType>(resComplexTy.getElementTy ()))
732
+ if (!resComplexTy ||
733
+ !mlir::isa<cir::IntType>(resComplexTy.getElementType ()))
732
734
return emitOpError () << " requires !cir.complex<!cir.int> type for result" ;
733
735
return success ();
734
736
}
735
737
case cir::CastKind::int_complex: {
736
738
auto srcComplexTy = mlir::dyn_cast<cir::ComplexType>(srcType);
737
- if (!srcComplexTy || !mlir::isa<cir::IntType>(srcComplexTy.getElementTy ()))
739
+ if (!srcComplexTy ||
740
+ !mlir::isa<cir::IntType>(srcComplexTy.getElementType ()))
738
741
return emitOpError () << " requires !cir.complex<!cir.int> type for source" ;
739
742
auto resComplexTy = mlir::dyn_cast<cir::ComplexType>(resType);
740
- if (!resComplexTy || !mlir::isa<cir::IntType>(resComplexTy.getElementTy ()))
743
+ if (!resComplexTy ||
744
+ !mlir::isa<cir::IntType>(resComplexTy.getElementType ()))
741
745
return emitOpError () << " requires !cir.complex<!cir.int> type for result" ;
742
746
return success ();
743
747
}
744
748
case cir::CastKind::int_complex_to_float_complex: {
745
749
auto srcComplexTy = mlir::dyn_cast<cir::ComplexType>(srcType);
746
- if (!srcComplexTy || !mlir::isa<cir::IntType>(srcComplexTy.getElementTy ()))
750
+ if (!srcComplexTy ||
751
+ !mlir::isa<cir::IntType>(srcComplexTy.getElementType ()))
747
752
return emitOpError () << " requires !cir.complex<!cir.int> type for source" ;
748
753
auto resComplexTy = mlir::dyn_cast<cir::ComplexType>(resType);
749
754
if (!resComplexTy ||
750
- !mlir::isa<cir::CIRFPTypeInterface>(resComplexTy.getElementTy ()))
755
+ !mlir::isa<cir::CIRFPTypeInterface>(resComplexTy.getElementType ()))
751
756
return emitOpError ()
752
757
<< " requires !cir.complex<!cir.float> type for result" ;
753
758
return success ();
@@ -912,7 +917,7 @@ LogicalResult cir::DerivedMethodOp::verify() {
912
917
// ===----------------------------------------------------------------------===//
913
918
914
919
LogicalResult cir::ComplexCreateOp::verify () {
915
- if (getType ().getElementTy () != getReal ().getType ()) {
920
+ if (getType ().getElementType () != getReal ().getType ()) {
916
921
emitOpError ()
917
922
<< " operand type of cir.complex.create does not match its result type" ;
918
923
return failure ();
@@ -945,7 +950,7 @@ OpFoldResult cir::ComplexCreateOp::fold(FoldAdaptor adaptor) {
945
950
// ===----------------------------------------------------------------------===//
946
951
947
952
LogicalResult cir::ComplexRealOp::verify () {
948
- if (getType () != getOperand ().getType ().getElementTy ()) {
953
+ if (getType () != getOperand ().getType ().getElementType ()) {
949
954
emitOpError () << " cir.complex.real result type does not match operand type" ;
950
955
return failure ();
951
956
}
@@ -960,7 +965,7 @@ OpFoldResult cir::ComplexRealOp::fold(FoldAdaptor adaptor) {
960
965
}
961
966
962
967
LogicalResult cir::ComplexImagOp::verify () {
963
- if (getType () != getOperand ().getType ().getElementTy ()) {
968
+ if (getType () != getOperand ().getType ().getElementType ()) {
964
969
emitOpError () << " cir.complex.imag result type does not match operand type" ;
965
970
return failure ();
966
971
}
@@ -984,7 +989,7 @@ LogicalResult cir::ComplexRealPtrOp::verify() {
984
989
auto operandPointeeTy =
985
990
mlir::cast<cir::ComplexType>(operandPtrTy.getPointee ());
986
991
987
- if (resultPointeeTy != operandPointeeTy.getElementTy ()) {
992
+ if (resultPointeeTy != operandPointeeTy.getElementType ()) {
988
993
emitOpError ()
989
994
<< " cir.complex.real_ptr result type does not match operand type" ;
990
995
return failure ();
@@ -999,7 +1004,7 @@ LogicalResult cir::ComplexImagPtrOp::verify() {
999
1004
auto operandPointeeTy =
1000
1005
mlir::cast<cir::ComplexType>(operandPtrTy.getPointee ());
1001
1006
1002
- if (resultPointeeTy != operandPointeeTy.getElementTy ()) {
1007
+ if (resultPointeeTy != operandPointeeTy.getElementType ()) {
1003
1008
emitOpError ()
1004
1009
<< " cir.complex.imag_ptr result type does not match operand type" ;
1005
1010
return failure ();
0 commit comments