[PATCH] D23834: [AArch64] Allow label arithmetic with add/sub/cmp

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 20:46:22 PDT 2016


compnerd added inline comments.

================
Comment at: lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp:733
@@ +732,3 @@
+    if (CE)
+      return CE->getValue() >= 0 && CE->getValue() <= 0xfff;
+
----------------
I think this is better written as:

  if (auto *CE = dyn_cast<MCConstantExpr>(Expr))
    return CE->getValue() >= 0 && CE->getValue() <= 0xfff;
  return true;


https://reviews.llvm.org/D23834





More information about the llvm-commits mailing list