[llvm-branch-commits] [llvm] 7f8779e - [llvm][AArch64] Actually check expected FPU for CPUs

David Spickett via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Dec 17 01:20:55 PST 2020


Author: David Spickett
Date: 2020-12-17T09:15:51Z
New Revision: 7f8779e4e66b4eb3292386c1a214019f7a519c0e

URL: https://github.com/llvm/llvm-project/commit/7f8779e4e66b4eb3292386c1a214019f7a519c0e
DIFF: https://github.com/llvm/llvm-project/commit/7f8779e4e66b4eb3292386c1a214019f7a519c0e.diff

LOG: [llvm][AArch64] Actually check expected FPU for CPUs

We were passing this as an argument but never using
it. ARM has always checked this.

Note that the FPU list is shared between ARM and AArch64
so there is no AArch64::getFPUName, just ARM::getFPUName.

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D93387

Added: 
    

Modified: 
    llvm/unittests/Support/TargetParserTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/TargetParserTest.cpp b/llvm/unittests/Support/TargetParserTest.cpp
index 2688f0ca3065..65f99df195dc 100644
--- a/llvm/unittests/Support/TargetParserTest.cpp
+++ b/llvm/unittests/Support/TargetParserTest.cpp
@@ -805,6 +805,9 @@ bool testAArch64CPU(StringRef CPUName, StringRef ExpectedArch,
   else
     pass &= (ExtKind == ExpectedFlags);
 
+  unsigned FPUKind = AArch64::getDefaultFPU(CPUName, AK);
+  pass &= ARM::getFPUName(FPUKind).equals(ExpectedFPU);
+
   pass &= AArch64::getCPUAttr(AK).equals(CPUAttr);
 
   return pass;


        


More information about the llvm-branch-commits mailing list