[PATCH] D143645: [llvm] Fix MCSubtargetInfo::checkFeatures to handle unknown features correctly

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 22:25:37 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/MC/MCSubtargetInfo.cpp:313
+  // All input features are unknown features.
+  if (Set == Empty && All == Empty)
+    return false;
----------------
Why do we need an Empty set to compare to? Can't we just ask if no bits are set in Set and All? `Set.none() && All.none()` should work?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143645/new/

https://reviews.llvm.org/D143645



More information about the llvm-commits mailing list