[PATCH] D26343: [RFC] Refactor TargetParserTests
jojo.ma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 2 01:17:12 PST 2016
jojo added a comment.
> I'm wondering if the &= is the reason why you're getting the wrong expectation on the tests...
The reason why a wrong flag for v8.2 was not exposed is I misused enums of ARM for ArchKind
there in the last diff.
================
Comment at: unittests/Support/TargetParserTest.cpp:40
+ unsigned FPUKind = ARM::getDefaultFPU(CPUName, ArchKind);
+ ret &= ARM::getFPUName(FPUKind).equals(ExpectedFPU);
+
----------------
rengolin wrote:
> Shouldn't this be `ret |=`?
It will return "true" here, only when all the items are the values that we expect.
So it should return a value after "&=".
================
Comment at: unittests/Support/TargetParserTest.cpp:582
+ unsigned FPUKind = AArch64::getDefaultFPU(CPUName, ArchKind);
+ ret &= AArch64::getFPUName(FPUKind).equals(ExpectedFPU);
+
----------------
rengolin wrote:
> Same here.
Same as above.
https://reviews.llvm.org/D26343
More information about the llvm-commits
mailing list