[llvm] 5bb27e7 - X86AvoidStoreForwardingBlocks.cpp - use unsigned for Opcode values. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 05:00:54 PDT 2020


Author: Simon Pilgrim
Date: 2020-09-07T12:56:27+01:00
New Revision: 5bb27e735d3ba561b93a12e07d79cd88a5bff338

URL: https://github.com/llvm/llvm-project/commit/5bb27e735d3ba561b93a12e07d79cd88a5bff338
DIFF: https://github.com/llvm/llvm-project/commit/5bb27e735d3ba561b93a12e07d79cd88a5bff338.diff

LOG: X86AvoidStoreForwardingBlocks.cpp - use unsigned for Opcode values. NFCI.

Fixes clang-tidy cppcoreguidelines-narrowing-conversions warnings.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp b/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
index 9f1fece1b9dd..fdc65acffe3d 100644
--- a/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
+++ b/llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
@@ -154,7 +154,7 @@ static bool isPotentialBlockedMemCpyLd(unsigned Opcode) {
   return isXMMLoadOpcode(Opcode) || isYMMLoadOpcode(Opcode);
 }
 
-static bool isPotentialBlockedMemCpyPair(int LdOpcode, int StOpcode) {
+static bool isPotentialBlockedMemCpyPair(unsigned LdOpcode, unsigned StOpcode) {
   switch (LdOpcode) {
   case X86::MOVUPSrm:
   case X86::MOVAPSrm:
@@ -206,7 +206,7 @@ static bool isPotentialBlockedMemCpyPair(int LdOpcode, int StOpcode) {
   }
 }
 
-static bool isPotentialBlockingStoreInst(int Opcode, int LoadOpcode) {
+static bool isPotentialBlockingStoreInst(unsigned Opcode, unsigned LoadOpcode) {
   bool PBlock = false;
   PBlock |= Opcode == X86::MOV64mr || Opcode == X86::MOV64mi32 ||
             Opcode == X86::MOV32mr || Opcode == X86::MOV32mi ||


        


More information about the llvm-commits mailing list