[llvm] [CodeGenPrepare][RISCV] Combine (X ^ Y) and (X == Y) where appropriate (PR #130922)
    Craig Topper via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr  1 15:27:14 PDT 2025
    
    
  
================
@@ -17194,12 +17194,56 @@ static bool combine_CC(SDValue &LHS, SDValue &RHS, SDValue &CC, const SDLoc &DL,
     return true;
   }
 
+  // If XOR is reused and has an immediate that will fit in XORI,
+  // do not fold.
+  auto IsXorImmediate = [](const SDValue &Op) -> bool {
+    if (const auto XorCnst = dyn_cast<ConstantSDNode>(Op))
----------------
topperc wrote:
`const auto *XorCnst`. LLVM Coding Standards don't want `auto` to hide that something is a pointer.
https://github.com/llvm/llvm-project/pull/130922
    
    
More information about the llvm-commits
mailing list