@@ -671,12 +671,10 @@ spirv::LogicalEqualOp::fold(spirv::LogicalEqualOp::FoldAdaptor adaptor) {
671
671
// x == x -> true
672
672
if (getOperand1 () == getOperand2 ()) {
673
673
auto trueAttr = BoolAttr::get (getContext (), true );
674
- if (isa<IntegerType>(getType ())) {
674
+ if (isa<IntegerType>(getType ()))
675
675
return trueAttr;
676
- }
677
- if (auto vecTy = dyn_cast<VectorType>(getType ())) {
676
+ if (auto vecTy = dyn_cast<VectorType>(getType ()))
678
677
return SplatElementsAttr::get (vecTy, trueAttr);
679
- }
680
678
}
681
679
682
680
return constFoldBinaryOp<IntegerAttr>(
@@ -700,12 +698,10 @@ OpFoldResult spirv::LogicalNotEqualOp::fold(FoldAdaptor adaptor) {
700
698
// x == x -> false
701
699
if (getOperand1 () == getOperand2 ()) {
702
700
auto falseAttr = BoolAttr::get (getContext (), false );
703
- if (isa<IntegerType>(getType ())) {
701
+ if (isa<IntegerType>(getType ()))
704
702
return falseAttr;
705
- }
706
- if (auto vecTy = dyn_cast<VectorType>(getType ())) {
703
+ if (auto vecTy = dyn_cast<VectorType>(getType ()))
707
704
return SplatElementsAttr::get (vecTy, falseAttr);
708
- }
709
705
}
710
706
711
707
return constFoldBinaryOp<IntegerAttr>(
@@ -754,12 +750,10 @@ OpFoldResult spirv::IEqualOp::fold(spirv::IEqualOp::FoldAdaptor adaptor) {
754
750
// x == x -> true
755
751
if (getOperand1 () == getOperand2 ()) {
756
752
auto trueAttr = BoolAttr::get (getContext (), true );
757
- if (isa<IntegerType>(getType ())) {
753
+ if (isa<IntegerType>(getType ()))
758
754
return trueAttr;
759
- }
760
- if (auto vecTy = dyn_cast<VectorType>(getType ())) {
755
+ if (auto vecTy = dyn_cast<VectorType>(getType ()))
761
756
return SplatElementsAttr::get (vecTy, trueAttr);
762
- }
763
757
}
764
758
765
759
return constFoldBinaryOp<IntegerAttr>(
@@ -776,12 +770,10 @@ OpFoldResult spirv::INotEqualOp::fold(spirv::INotEqualOp::FoldAdaptor adaptor) {
776
770
// x == x -> false
777
771
if (getOperand1 () == getOperand2 ()) {
778
772
auto falseAttr = BoolAttr::get (getContext (), false );
779
- if (isa<IntegerType>(getType ())) {
773
+ if (isa<IntegerType>(getType ()))
780
774
return falseAttr;
781
- }
782
- if (auto vecTy = dyn_cast<VectorType>(getType ())) {
775
+ if (auto vecTy = dyn_cast<VectorType>(getType ()))
783
776
return SplatElementsAttr::get (vecTy, falseAttr);
784
- }
785
777
}
786
778
787
779
return constFoldBinaryOp<IntegerAttr>(
0 commit comments