[llvm] 0ac210e - [X86] isTargetShuffleEquivalent - merge duplicate array accesses. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 09:27:55 PDT 2020
Author: Simon Pilgrim
Date: 2020-10-05T17:22:14+01:00
New Revision: 0ac210e5801ac8f80305613aac3f9a89ba0cc83d
URL: https://github.com/llvm/llvm-project/commit/0ac210e5801ac8f80305613aac3f9a89ba0cc83d
DIFF: https://github.com/llvm/llvm-project/commit/0ac210e5801ac8f80305613aac3f9a89ba0cc83d.diff
LOG: [X86] isTargetShuffleEquivalent - merge duplicate array accesses. NFCI.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 47aad8965e1c..8638db813360 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -10955,7 +10955,7 @@ static bool isTargetShuffleEquivalent(MVT VT, ArrayRef<int> Mask,
int ExpectedIdx = ExpectedMask[i];
if (MaskIdx == SM_SentinelUndef || MaskIdx == ExpectedIdx)
continue;
- if (0 <= Mask[i] && 0 <= ExpectedMask[i]) {
+ if (0 <= MaskIdx && 0 <= ExpectedIdx) {
SDValue MaskV = MaskIdx < Size ? V1 : V2;
SDValue ExpectedV = ExpectedIdx < Size ? V1 : V2;
MaskIdx = MaskIdx < Size ? MaskIdx : (MaskIdx - Size);
More information about the llvm-commits
mailing list