[PATCH] D25530: [MIRParser] Parse lane masks in block liveins

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 13:24:01 PDT 2016


MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.

Have you seen https://reviews.llvm.org/D24208? This here is a good solution for that problem, LGTM.



================
Comment at: lib/CodeGen/MIRParser/MILexer.cpp:449-452
+  if (isValidHexFloatingPointPrefix(C.peek())) {
+    C.advance();
+    PrefLen++;
+  }
----------------
If we find one of those hex prefixes we could go to FloatingPointLiteral immediately.


================
Comment at: lib/CodeGen/MIRParser/MIParser.cpp:1150-1152
+    APInt Limit = APInt(BW, std::numeric_limits<unsigned>::max());
+    if (A.ugt(Limit))
+      return error("expected 32-bit integer (too large)");
----------------
I don't like relying on `numeric_limits<unsigned>` here and would rather hardcode 32 to get consistent behaviour even if a platform has bigger unsigned numbers. But I realize this is in line with the existing code so we can fix that in a separate commit.


Repository:
  rL LLVM

https://reviews.llvm.org/D25530





More information about the llvm-commits mailing list