[clang] 34536db - Revert "[ARM][MVE][Intrinsics] remove extraneous intrinsics."
Dmitri Gribenko via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 13 08:20:13 PST 2019
Author: Dmitri Gribenko
Date: 2019-12-13T17:16:13+01:00
New Revision: 34536db7bbe0b8c5f8ffa70df307312b451aca2e
URL: https://github.com/llvm/llvm-project/commit/34536db7bbe0b8c5f8ffa70df307312b451aca2e
DIFF: https://github.com/llvm/llvm-project/commit/34536db7bbe0b8c5f8ffa70df307312b451aca2e.diff
LOG: Revert "[ARM][MVE][Intrinsics] remove extraneous intrinsics."
This reverts commit 0eb0992739189dba0d86af33722bc27260a9b555.
The code does not compile:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/20462
Added:
Modified:
clang/include/clang/Basic/arm_mve.td
clang/include/clang/Basic/arm_mve_defs.td
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/arm_mve.td b/clang/include/clang/Basic/arm_mve.td
index 15ed4ce83f01..6a27bdb807a9 100644
--- a/clang/include/clang/Basic/arm_mve.td
+++ b/clang/include/clang/Basic/arm_mve.td
@@ -79,6 +79,10 @@ def vmulhq: Intrinsic<Vector, (args Vector:$a, Vector:$b),
(IRInt<"vmulh", [Vector]> $a, $b)>;
def vrmulhq: Intrinsic<Vector, (args Vector:$a, Vector:$b),
(IRInt<"vrmulh", [Vector]> $a, $b)>;
+def vqdmulhq: Intrinsic<Vector, (args Vector:$a, Vector:$b),
+ (IRInt<"vqdmulh", [Vector]> $a, $b)>;
+def vqrdmulhq: Intrinsic<Vector, (args Vector:$a, Vector:$b),
+ (IRInt<"vqrdmulh", [Vector]> $a, $b)>;
def vmullbq_int: Intrinsic<DblVector, (args Vector:$a, Vector:$b),
(IRInt<"vmull", [DblVector, Vector]>
$a, $b, 0)>;
@@ -86,12 +90,6 @@ def vmulltq_int: Intrinsic<DblVector, (args Vector:$a, Vector:$b),
(IRInt<"vmull", [DblVector, Vector]>
$a, $b, 1)>;
}
-let params = T.Signed in {
-def vqdmulhq: Intrinsic<Vector, (args Vector:$a, Vector:$b),
- (IRInt<"vqdmulh", [Vector]> $a, $b)>;
-def vqrdmulhq: Intrinsic<Vector, (args Vector:$a, Vector:$b),
- (IRInt<"vqrdmulh", [Vector]> $a, $b)>;
-}
let params = T.Poly, overrideKindLetter = "p" in {
def vmullbq_poly: Intrinsic<DblVector, (args Vector:$a, Vector:$b),
@@ -137,12 +135,11 @@ def vabdq: Intrinsic<Vector, (args Vector:$a, Vector:$b),
(IRInt<"vabd", [Vector]> $a, $b)>;
}
-multiclass VectorVectorArithmetic<string operation, int wantXVariant = 1> {
+multiclass VectorVectorArithmetic<string operation> {
defm "" : IntrinsicMX<Vector, (args Vector:$a, Vector:$b,
Predicate:$pred),
(IRInt<operation, [Vector, Predicate]> $a, $b,
- $pred, $inactive),
- wantXVariant>;
+ $pred, $inactive)>;
}
multiclass VectorVectorArithmeticBitcast<string operation> {
@@ -182,18 +179,16 @@ let params = T.Int in {
defm vmaxq : VectorVectorArithmetic<"max_predicated">;
defm vmulhq : VectorVectorArithmetic<"mulh_predicated">;
defm vrmulhq : VectorVectorArithmetic<"rmulh_predicated">;
- defm vqaddq : VectorVectorArithmetic<"qadd_predicated", 0>;
+ defm vqdmulhq : VectorVectorArithmetic<"qdmulh_predicated">;
+ defm vqrdmulhq : VectorVectorArithmetic<"qrdmulh_predicated">;
+ defm vqaddq : VectorVectorArithmetic<"qadd_predicated">;
defm vhaddq : VectorVectorArithmetic<"hadd_predicated">;
defm vrhaddq : VectorVectorArithmetic<"rhadd_predicated">;
- defm vqsubq : VectorVectorArithmetic<"qsub_predicated", 0>;
+ defm vqsubq : VectorVectorArithmetic<"qsub_predicated">;
defm vhsubq : VectorVectorArithmetic<"hsub_predicated">;
defm vmullbq_int : DblVectorVectorArithmetic<"mull_int_predicated", (u32 0)>;
defm vmulltq_int : DblVectorVectorArithmetic<"mull_int_predicated", (u32 1)>;
}
-let params = T.Signed in {
- defm vqdmulhq : VectorVectorArithmetic<"qdmulh_predicated", 0>;
- defm vqrdmulhq : VectorVectorArithmetic<"qrdmulh_predicated", 0>;
-}
let params = T.Poly, overrideKindLetter = "p" in {
defm vmullbq_poly : DblVectorVectorArithmetic<"mull_poly_predicated", (u32 0)>;
@@ -599,7 +594,7 @@ let params = T.Int in {
defm vshlq: IntrinsicMX<Vector, (args Vector:$v, imm_0toNm1:$sh,
Predicate:$pred),
(IRInt<"shl_imm_predicated", [Vector, Predicate]>
- $v, $sh, $pred, $inactive), 1, "_n">;
+ $v, $sh, $pred, $inactive), "_n">;
let pnt = PNT_NType in {
def vshrq_n: Intrinsic<Vector, (args Vector:$v, imm_1toN:$sh),
@@ -607,7 +602,7 @@ let params = T.Int in {
defm vshrq: IntrinsicMX<Vector, (args Vector:$v, imm_1toN:$sh,
Predicate:$pred),
(IRInt<"shr_imm_predicated", [Vector, Predicate]>
- $v, $sh, (unsignedflag Scalar), $pred, $inactive), 1, "_n">;
+ $v, $sh, (unsignedflag Scalar), $pred, $inactive), "_n">;
}
}
diff --git a/clang/include/clang/Basic/arm_mve_defs.td b/clang/include/clang/Basic/arm_mve_defs.td
index 939d5eb0cd6b..03472fb47b6c 100644
--- a/clang/include/clang/Basic/arm_mve_defs.td
+++ b/clang/include/clang/Basic/arm_mve_defs.td
@@ -440,7 +440,6 @@ class NameOverride<string basename_> {
// A wrapper to define both _m and _x versions of a predicated
// intrinsic.
multiclass IntrinsicMX<Type rettype, dag arguments, dag cg,
- int wantXVariant = 1,
string nameSuffix = "",
PolymorphicNameType pnt_x = PNT_Type> {
// The _m variant takes an initial parameter called $inactive, which
@@ -450,17 +449,15 @@ multiclass IntrinsicMX<Type rettype, dag arguments, dag cg,
def "_m" # nameSuffix:
Intrinsic<rettype, !con((args rettype:$inactive), arguments), cg>;
- foreach unusedVar = !if(!eq(wantXVariant, 1), [1], []<int>) in {
- // The _x variant leaves off that parameter, and simply uses an
- // undef value of the same type.
- def "_x" # nameSuffix:
- Intrinsic<rettype, arguments, (seq (undef rettype):$inactive, cg)> {
- // Allow overriding of the polymorphic name type, because
- // sometimes the _m and _x variants polymorph
diff erently
- // (typically because the type of the inactive parameter can be
- // used as a disambiguator if it's present).
- let pnt = pnt_x;
- }
+ // The _x variant leaves off that parameter, and simply uses an
+ // undef value of the same type.
+ def "_x" # nameSuffix:
+ Intrinsic<rettype, arguments, (seq (undef rettype):$inactive, cg)> {
+ // Allow overriding of the polymorphic name type, because
+ // sometimes the _m and _x variants polymorph
diff erently
+ // (typically because the type of the inactive parameter can be
+ // used as a disambiguator if it's present).
+ let pnt = pnt_x;
}
}
More information about the cfe-commits
mailing list