[llvm] [X86] combineVectorSizedSetCCEquality - ensure the load is a normal load (PR #172212)

via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 14 05:49:06 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-x86

Author: Simon Pilgrim (RKSimon)

<details>
<summary>Changes</summary>

Noticed while trying to replace the IsVectorBitCastCheap helper with mayFoldIntoVector (still some work to do as we have a number of multiuse cases) - technically its possible for a extload to reach this point.

---
Full diff: https://github.com/llvm/llvm-project/pull/172212.diff


1 Files Affected:

- (modified) llvm/lib/Target/X86/X86ISelLowering.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index d383553d2e8b5..c28584cc14991 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -23125,7 +23125,7 @@ static SDValue combineVectorSizedSetCCEquality(EVT VT, SDValue X, SDValue Y,
   auto IsVectorBitCastCheap = [](SDValue X) {
     X = peekThroughBitcasts(X);
     return isa<ConstantSDNode>(X) || X.getValueType().isVector() ||
-           X.getOpcode() == ISD::LOAD;
+           ISD::isNormalLoad(X.getNode());
   };
   if ((!IsVectorBitCastCheap(X) || !IsVectorBitCastCheap(Y)) &&
       !IsOrXorXorTreeCCZero)

``````````

</details>


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


More information about the llvm-commits mailing list