[llvm] 2504693 - [ARM][NFC] Remove redundant sub-expressions (#122911)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 22:25:40 PST 2025


Author: Longsheng Mou
Date: 2025-01-15T14:25:36+08:00
New Revision: 2504693d75c6ed1047955dd6e65ce9d4c1a164c8

URL: https://github.com/llvm/llvm-project/commit/2504693d75c6ed1047955dd6e65ce9d4c1a164c8
DIFF: https://github.com/llvm/llvm-project/commit/2504693d75c6ed1047955dd6e65ce9d4c1a164c8.diff

LOG: [ARM][NFC] Remove redundant sub-expressions (#122911)

This PR removes redundant sub-expressions `Mnemonic != "vqmovnt"`, which
is mentioned in https://pvs-studio.com/en/blog/posts/cpp/1188/.

Added: 
    

Modified: 
    llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 024a64aceedbdc..dad91c6a969e87 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -6663,9 +6663,9 @@ StringRef ARMAsmParser::splitMnemonic(StringRef Mnemonic, StringRef ExtraToken,
       Mnemonic != "vshllt" && Mnemonic != "vrshrnt" && Mnemonic != "vshrnt" &&
       Mnemonic != "vqrshrunt" && Mnemonic != "vqshrunt" &&
       Mnemonic != "vqrshrnt" && Mnemonic != "vqshrnt" && Mnemonic != "vmullt" &&
-      Mnemonic != "vqmovnt" && Mnemonic != "vqmovunt" &&
-      Mnemonic != "vqmovnt" && Mnemonic != "vmovnt" && Mnemonic != "vqdmullt" &&
-      Mnemonic != "vpnot" && Mnemonic != "vcvtt" && Mnemonic != "vcvt") {
+      Mnemonic != "vqmovnt" && Mnemonic != "vqmovunt" && Mnemonic != "vmovnt" &&
+      Mnemonic != "vqdmullt" && Mnemonic != "vpnot" && Mnemonic != "vcvtt" &&
+      Mnemonic != "vcvt") {
     unsigned VCC =
         ARMVectorCondCodeFromString(Mnemonic.substr(Mnemonic.size() - 1));
     if (VCC != ~0U) {


        


More information about the llvm-commits mailing list