Author: Akira Hatanaka Date: 2019-11-22T13:48:39-08:00 New Revision: 825235c140e7747f686bd7902cb0f9af77590841
URL: https://github.com/llvm/llvm-project/commit/825235c140e7747f686bd7902cb0f9af77590841 DIFF: https://github.com/llvm/llvm-project/commit/825235c140e7747f686bd7902cb0f9af77590841.diff LOG: Revert "[Sema] Use the canonical type in function isVector" This reverts commit a6150b48cea00ab31e9335cc73770327acc4cb3a. The commit broke a few neon CodeGen tests. Added: Modified: clang/lib/Sema/SemaExpr.cpp clang/test/Sema/fp16vec-sema.c Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 63a189a102fc..3be8af1dd9e7 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -8155,7 +8155,7 @@ Sema::CheckAssignmentConstraints(SourceLocation Loc, /// type ElementType. static bool isVector(QualType QT, QualType ElementType) { if (const VectorType *VT = QT->getAs<VectorType>()) - return VT->getElementType().getCanonicalType() == ElementType; + return VT->getElementType() == ElementType; return false; } diff --git a/clang/test/Sema/fp16vec-sema.c b/clang/test/Sema/fp16vec-sema.c index 3d028224d22d..aefb5f86a14b 100644 --- a/clang/test/Sema/fp16vec-sema.c +++ b/clang/test/Sema/fp16vec-sema.c @@ -4,7 +4,6 @@ typedef __fp16 half4 __attribute__ ((vector_size (8))); typedef float float4 __attribute__ ((vector_size (16))); typedef short short4 __attribute__ ((vector_size (8))); typedef int int4 __attribute__ ((vector_size (16))); -typedef __fp16 float16_t; half4 hv0, hv1; float4 fv0, fv1; @@ -50,9 +49,3 @@ void testFP16Vec(int c) { hv0++; // expected-error{{cannot increment value of type}} ++hv0; // expected-error{{cannot increment value of type}} } - -void testTypeDef() { - __fp16 t0 __attribute__((vector_size (8))); - float16_t t1 __attribute__((vector_size (8))); - t1 = t0; -} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits