[llvm] [llvm][AArch64] Add missing default cases (PR #89930)

Troy Butler via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 06:57:05 PDT 2024


https://github.com/Troy-Butler updated https://github.com/llvm/llvm-project/pull/89930

>From e0f819ebd2b630f4fb8e6a3128fada4c5984ed81 Mon Sep 17 00:00:00 2001
From: Troy-Butler <squintik at outlook.com>
Date: Wed, 24 Apr 2024 09:42:22 -0400
Subject: [PATCH 1/2] [llvm][AArch64] Add missing default case

Signed-off-by: Troy-Butler <squintik at outlook.com>
---
 llvm/lib/Target/AArch64/AArch64InstrInfo.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.h b/llvm/lib/Target/AArch64/AArch64InstrInfo.h
index 9a2914891675c5..fe4943ab43cc8f 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.h
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.h
@@ -724,6 +724,7 @@ static inline unsigned getAUTOpcodeForKey(AArch64PACKey::ID K, bool Zero) {
   case IB: return Zero ? AArch64::AUTIZB : AArch64::AUTIB;
   case DA: return Zero ? AArch64::AUTDZA : AArch64::AUTDA;
   case DB: return Zero ? AArch64::AUTDZB : AArch64::AUTDB;
+  default: return 0;
   }
 }
 
@@ -736,6 +737,7 @@ static inline unsigned getPACOpcodeForKey(AArch64PACKey::ID K, bool Zero) {
   case IB: return Zero ? AArch64::PACIZB : AArch64::PACIB;
   case DA: return Zero ? AArch64::PACDZA : AArch64::PACDA;
   case DB: return Zero ? AArch64::PACDZB : AArch64::PACDB;
+  default: return 0;
   }
 }
 

>From 71c8f41181997a0fdd439fa029718dfb4e613dc0 Mon Sep 17 00:00:00 2001
From: Troy-Butler <squintik at outlook.com>
Date: Wed, 24 Apr 2024 09:56:48 -0400
Subject: [PATCH 2/2] Fix code formatting issue

Signed-off-by: Troy-Butler <squintik at outlook.com>
---
 llvm/lib/Target/AArch64/AArch64InstrInfo.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.h b/llvm/lib/Target/AArch64/AArch64InstrInfo.h
index fe4943ab43cc8f..05ab5c2f0e4330 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.h
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.h
@@ -724,7 +724,8 @@ static inline unsigned getAUTOpcodeForKey(AArch64PACKey::ID K, bool Zero) {
   case IB: return Zero ? AArch64::AUTIZB : AArch64::AUTIB;
   case DA: return Zero ? AArch64::AUTDZA : AArch64::AUTDA;
   case DB: return Zero ? AArch64::AUTDZB : AArch64::AUTDB;
-  default: return 0;
+  default:
+    return 0;
   }
 }
 
@@ -737,7 +738,8 @@ static inline unsigned getPACOpcodeForKey(AArch64PACKey::ID K, bool Zero) {
   case IB: return Zero ? AArch64::PACIZB : AArch64::PACIB;
   case DA: return Zero ? AArch64::PACDZA : AArch64::PACDA;
   case DB: return Zero ? AArch64::PACDZB : AArch64::PACDB;
-  default: return 0;
+  default:
+    return 0;
   }
 }
 



More information about the llvm-commits mailing list