[llvm] e1fdaaa - [AMDGPU] Work around a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 09:35:20 PDT 2024


Author: Kazu Hirata
Date: 2024-09-06T09:35:13-07:00
New Revision: e1fdaaafc51bf7323813139b2809ffea43e65ee4

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

LOG: [AMDGPU] Work around a warning

This patch works around:

  llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp:1101:13:
  error: enumeration values 'USubCond' and 'USubSat' not handled in
  switch [-Werror,-Wswitch]

I've notified the author in #105568.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
index 77971323aa1ec6..787747e6055805 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
@@ -1154,6 +1154,9 @@ Value *SplitPtrStructs::handleMemoryInst(Instruction *I, Value *Arg, Value *Ptr,
       break;
     case AtomicRMWInst::BAD_BINOP:
       llvm_unreachable("Not sure how we got a bad binop");
+    case AtomicRMWInst::USubCond:
+    case AtomicRMWInst::USubSat:
+      break;
     }
   }
 


        


More information about the llvm-commits mailing list