This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe4b4543ff0c8: [Clang] [TableGen] Clean up !if(!eq(bool, 1) and related booleans (authored by Paul-C-Anagnostopoulos).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89893/new/ https://reviews.llvm.org/D89893 Files: clang/include/clang/Basic/arm_mve.td clang/include/clang/Basic/arm_mve_defs.td Index: clang/include/clang/Basic/arm_mve_defs.td =================================================================== --- clang/include/clang/Basic/arm_mve_defs.td +++ clang/include/clang/Basic/arm_mve_defs.td @@ -519,7 +519,7 @@ // polymorph differently (typically because the type of the inactive // parameter can be used as a disambiguator if it's present). multiclass IntrinsicMX<Type rettype, dag arguments, dag cg, - int wantXVariant = 1, + bit wantXVariant = 1, string nameSuffix = "", PolymorphicNameType pnt_m = PNT_Type, PolymorphicNameType pnt_x = PNT_Type> { @@ -532,7 +532,7 @@ let pnt = pnt_m; } - foreach unusedVar = !if(!eq(wantXVariant, 1), [1], []<int>) in { + if wantXVariant then { // The _x variant leaves off that parameter, and simply uses an // undef value of the same type. @@ -546,7 +546,7 @@ // Same as above, but with an additional parameter 'basename' which overrides // the C intrinsic base name multiclass IntrinsicMXNameOverride<Type rettype, dag arguments, dag cg, - string basename, int wantXVariant = 1, + string basename, bit wantXVariant = 1, string nameSuffix = "", PolymorphicNameType pnt_m = PNT_Type, PolymorphicNameType pnt_x = PNT_Type> { @@ -556,7 +556,7 @@ let pnt = pnt_m; } - foreach unusedVar = !if(!eq(wantXVariant, 1), [1], []<int>) in { + if wantXVariant then { def "_x" # nameSuffix: Intrinsic<rettype, arguments, (seq (undef rettype):$inactive, cg)>, NameOverride<basename # "_x" # nameSuffix> { Index: clang/include/clang/Basic/arm_mve.td =================================================================== --- clang/include/clang/Basic/arm_mve.td +++ clang/include/clang/Basic/arm_mve.td @@ -406,7 +406,7 @@ } multiclass VectorVectorArithmetic<string operation, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMX< Vector, (args Vector:$a, Vector:$b, Predicate:$pred), !con((IRInt<operation, [Vector, Predicate]> $a, $b), @@ -415,7 +415,7 @@ multiclass VectorScalarArithmetic<string operation, string basename, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMXNameOverride< Vector, (args Vector:$a, unpromoted<Scalar>:$b, Predicate:$pred), !con((IRInt<operation, [Vector, Predicate]> $a, (splat $b)), @@ -451,7 +451,7 @@ } multiclass DblVectorVectorArithmetic<string operation, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMX< DblVector, (args Vector:$a, Vector:$b, DblPredicate:$pred), !con((IRInt<operation, [DblVector, Vector, DblPredicate]> $a, $b), @@ -460,7 +460,7 @@ multiclass DblVectorScalarArithmetic<string operation, string basename, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMXNameOverride< DblVector, (args Vector:$a, unpromoted<Scalar>:$b, DblPredicate:$pred), !con((IRInt<operation, [DblVector, Vector, DblPredicate]> $a, (splat $b)),
Index: clang/include/clang/Basic/arm_mve_defs.td =================================================================== --- clang/include/clang/Basic/arm_mve_defs.td +++ clang/include/clang/Basic/arm_mve_defs.td @@ -519,7 +519,7 @@ // polymorph differently (typically because the type of the inactive // parameter can be used as a disambiguator if it's present). multiclass IntrinsicMX<Type rettype, dag arguments, dag cg, - int wantXVariant = 1, + bit wantXVariant = 1, string nameSuffix = "", PolymorphicNameType pnt_m = PNT_Type, PolymorphicNameType pnt_x = PNT_Type> { @@ -532,7 +532,7 @@ let pnt = pnt_m; } - foreach unusedVar = !if(!eq(wantXVariant, 1), [1], []<int>) in { + if wantXVariant then { // The _x variant leaves off that parameter, and simply uses an // undef value of the same type. @@ -546,7 +546,7 @@ // Same as above, but with an additional parameter 'basename' which overrides // the C intrinsic base name multiclass IntrinsicMXNameOverride<Type rettype, dag arguments, dag cg, - string basename, int wantXVariant = 1, + string basename, bit wantXVariant = 1, string nameSuffix = "", PolymorphicNameType pnt_m = PNT_Type, PolymorphicNameType pnt_x = PNT_Type> { @@ -556,7 +556,7 @@ let pnt = pnt_m; } - foreach unusedVar = !if(!eq(wantXVariant, 1), [1], []<int>) in { + if wantXVariant then { def "_x" # nameSuffix: Intrinsic<rettype, arguments, (seq (undef rettype):$inactive, cg)>, NameOverride<basename # "_x" # nameSuffix> { Index: clang/include/clang/Basic/arm_mve.td =================================================================== --- clang/include/clang/Basic/arm_mve.td +++ clang/include/clang/Basic/arm_mve.td @@ -406,7 +406,7 @@ } multiclass VectorVectorArithmetic<string operation, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMX< Vector, (args Vector:$a, Vector:$b, Predicate:$pred), !con((IRInt<operation, [Vector, Predicate]> $a, $b), @@ -415,7 +415,7 @@ multiclass VectorScalarArithmetic<string operation, string basename, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMXNameOverride< Vector, (args Vector:$a, unpromoted<Scalar>:$b, Predicate:$pred), !con((IRInt<operation, [Vector, Predicate]> $a, (splat $b)), @@ -451,7 +451,7 @@ } multiclass DblVectorVectorArithmetic<string operation, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMX< DblVector, (args Vector:$a, Vector:$b, DblPredicate:$pred), !con((IRInt<operation, [DblVector, Vector, DblPredicate]> $a, $b), @@ -460,7 +460,7 @@ multiclass DblVectorScalarArithmetic<string operation, string basename, dag extraArgs = (?), - int wantXVariant = 1> { + bit wantXVariant = 1> { defm "" : IntrinsicMXNameOverride< DblVector, (args Vector:$a, unpromoted<Scalar>:$b, DblPredicate:$pred), !con((IRInt<operation, [DblVector, Vector, DblPredicate]> $a, (splat $b)),
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits