[llvm] [AMDGPU] Account for existing SDWA selections  (PR #123221)
    Matt Arsenault via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Feb 26 01:11:11 PST 2025
    
    
  
================
@@ -451,13 +497,33 @@ bool SDWASrcOperand::convertToSDWA(MachineInstr &MI, const SIInstrInfo *TII) {
   }
   copyRegOperand(*Src, *getTargetOperand());
   if (!IsPreserveSrc) {
-    SrcSel->setImm(getSrcSel());
+    SdwaSel ExistingSel = static_cast<SdwaSel>(SrcSel->getImm());
----------------
arsenm wrote:
Does the machine verifier enforce that the SDWA values are a valid enum value? If not we should make sure it does 
https://github.com/llvm/llvm-project/pull/123221
    
    
More information about the llvm-commits
mailing list