[llvm] 8dd0da5 - [AArch64] Silence warning with different types in ternary. NFC

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 29 03:44:58 PST 2024


Author: David Green
Date: 2024-11-29T11:44:53Z
New Revision: 8dd0da5bd1c427a7ba2091b918c59b3ee7a8b79f

URL: https://github.com/llvm/llvm-project/commit/8dd0da5bd1c427a7ba2091b918c59b3ee7a8b79f
DIFF: https://github.com/llvm/llvm-project/commit/8dd0da5bd1c427a7ba2091b918c59b3ee7a8b79f.diff

LOG: [AArch64] Silence warning with different types in ternary. NFC

This just casts the Register to an unsigned, to fit in with the other types
returned from the function.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index d8bd14f97980a3..a9ba35899160c0 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -3025,7 +3025,7 @@ unsigned AArch64AsmParser::matchRegisterNameAlias(StringRef Name,
     return Kind == RegKind::Matrix ? RegNum : 0;
 
  if (Name.equals_insensitive("zt0"))
-    return Kind == RegKind::LookupTable ? AArch64::ZT0 : 0;
+    return Kind == RegKind::LookupTable ? unsigned(AArch64::ZT0) : 0;
 
   // The parsed register must be of RegKind Scalar
   if ((RegNum = MatchRegisterName(Name)))


        


More information about the llvm-commits mailing list