[PATCH] D26343: [RFC] Refactor TargetParserTests
Renato Golin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 02:40:59 PST 2016
rengolin added a comment.
Sorry for the delay, I'm wondering if the `&=` is the reason why you're getting the wrong expectation on the tests...
================
Comment at: unittests/Support/TargetParserTest.cpp:541
+ ARMBuildAttrs::CPUArch::v8_A));
+ EXPECT_TRUE(testAArch64Arch("armv8.2-a", "generic", "v8.2a",
+ ARMBuildAttrs::CPUArch::v8_A));
----------------
jojo wrote:
> rengolin wrote:
> > We now have v8M and v8R.
> AFAIK, both of them are 32bit.
> And v8R has been supported in ARMTargetParser.
> There is still no support in ARM backend for v8M,
> Should we add it to targetparser after it is actually
> supported in the backend?
Yes, because this tests the parser, not the target support.
================
Comment at: unittests/Support/TargetParserTest.cpp:40
+ unsigned FPUKind = ARM::getDefaultFPU(CPUName, ArchKind);
+ ret &= ARM::getFPUName(FPUKind).equals(ExpectedFPU);
+
----------------
Shouldn't this be `ret |=`?
================
Comment at: unittests/Support/TargetParserTest.cpp:582
+ unsigned FPUKind = AArch64::getDefaultFPU(CPUName, ArchKind);
+ ret &= AArch64::getFPUName(FPUKind).equals(ExpectedFPU);
+
----------------
Same here.
https://reviews.llvm.org/D26343
More information about the llvm-commits
mailing list