[llvm] b375f28 - [X86][AVX] lowerShuffleAsLanePermuteAndSHUFP - only set the demanded elements of the lane mask.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 12 01:42:30 PST 2020
Author: Simon Pilgrim
Date: 2020-01-12T09:41:40Z
New Revision: b375f28b0ec1129a4b94770a9c55ba49222ea1dd
URL: https://github.com/llvm/llvm-project/commit/b375f28b0ec1129a4b94770a9c55ba49222ea1dd
DIFF: https://github.com/llvm/llvm-project/commit/b375f28b0ec1129a4b94770a9c55ba49222ea1dd.diff
LOG: [X86][AVX] lowerShuffleAsLanePermuteAndSHUFP - only set the demanded elements of the lane mask.
Fixes an cyclic dependency issue with an upcoming patch where getVectorShuffle canonicalizes masks with splat build vector sources.
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 073b78b6ae67..c7a42b15cb0c 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -14907,8 +14907,7 @@ static SDValue lowerShuffleAsLanePermuteAndSHUFP(const SDLoc &DL, MVT VT,
continue;
int LaneBase = i & ~1;
auto &LaneMask = (i & 1) ? RHSMask : LHSMask;
- LaneMask[LaneBase + 0] = (M & ~1);
- LaneMask[LaneBase + 1] = (M & ~1) + 1;
+ LaneMask[LaneBase + (M & 1)] = M;
SHUFPMask |= (M & 1) << i;
}
More information about the llvm-commits
mailing list