[PATCH] D85225: [Target][AArch64] Allow for char as int8_t in AArch64AsmParser.cpp

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 02:14:44 PDT 2020


ro marked an inline comment as done.
ro added inline comments.


================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h:778
 static inline bool isSVEAddSubImm(int64_t Imm) {
-  bool IsInt8t = std::is_same<int8_t, std::make_signed_t<T>>::value;
-  return uint8_t(Imm) == Imm || (!IsInt8t && uint16_t(Imm & ~0xff) == Imm);
+  bool IsByte = sizeof(T) == 1;
+  return uint8_t(Imm) == Imm || (!IsByte && uint16_t(Imm & ~0xff) == Imm);
----------------
Renamed IsInt8t: it no longer matches the check and according to my testing signedness didn't matter here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85225



More information about the llvm-commits mailing list