[llvm-branch-commits] [llvm] [SelectionDAG][X86] Remove unused elements from atomic vector. (PR #125432)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 8 03:59:08 PDT 2025


================
@@ -7230,6 +7234,20 @@ static bool findEltLoadSrc(SDValue Elt, LoadSDNode *&Ld, int64_t &ByteOffset) {
       }
     }
     break;
+  case ISD::EXTRACT_ELEMENT:
+    if (auto *IdxC = dyn_cast<ConstantSDNode>(Elt.getOperand(1))) {
----------------
arsenm wrote:

Pretty sure this must be a constant. But this could also be done separately, it's not related to the atomic 

But also, can we avoid this by not using EXTRACT_ELEMENT in the first place? EXTRACT_ELEMENT has weird handling I've never understood where it's hardly used 

https://github.com/llvm/llvm-project/pull/125432


More information about the llvm-branch-commits mailing list