[llvm] 4ac501c - Revert "[X86][NFC] Refactor: there's only v16bf16 in 256-bit shuffle"
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 19:41:51 PDT 2023
Author: Phoebe Wang
Date: 2023-06-06T10:41:26+08:00
New Revision: 4ac501c5cab3b3337438e66703217569d4ef1799
URL: https://github.com/llvm/llvm-project/commit/4ac501c5cab3b3337438e66703217569d4ef1799
DIFF: https://github.com/llvm/llvm-project/commit/4ac501c5cab3b3337438e66703217569d4ef1799.diff
LOG: Revert "[X86][NFC] Refactor: there's only v16bf16 in 256-bit shuffle"
This reverts commit 50a2341fe92f8a5ff934bd279450581e9cbcf103.
This results in buildbot fail.
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 fce17bb5b2f6e..2542c8d1a3c63 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -19101,11 +19101,11 @@ static SDValue lower256BitShuffle(const SDLoc &DL, ArrayRef<int> Mask, MVT VT,
return DAG.getBitcast(VT, DAG.getVectorShuffle(FpVT, DL, V1, V2, Mask));
}
- if (VT == MVT::v16f16 || VT == MVT::v16bf16) {
- V1 = DAG.getBitcast(MVT::v16i16, V1);
- V2 = DAG.getBitcast(MVT::v16i16, V2);
- return DAG.getBitcast(MVT::v16f16,
- DAG.getVectorShuffle(MVT::v16i16, DL, V1, V2, Mask));
+ if (VT == MVT::v16f16 || VT.getVectorElementType() == MVT::bf16) {
+ MVT IVT = VT.changeVectorElementTypeToInteger();
+ V1 = DAG.getBitcast(IVT, V1);
+ V2 = DAG.getBitcast(IVT, V2);
+ return DAG.getBitcast(VT, DAG.getVectorShuffle(IVT, DL, V1, V2, Mask));
}
switch (VT.SimpleTy) {
More information about the llvm-commits
mailing list