[llvm] 6b36e0c - [X86] combineConcatVectorOps - consistently use EltSizeInBits. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 03:48:41 PDT 2023
Author: Simon Pilgrim
Date: 2023-08-11T11:46:07+01:00
New Revision: 6b36e0c544eaff501f70e991139af63fa5d57d21
URL: https://github.com/llvm/llvm-project/commit/6b36e0c544eaff501f70e991139af63fa5d57d21
DIFF: https://github.com/llvm/llvm-project/commit/6b36e0c544eaff501f70e991139af63fa5d57d21.diff
LOG: [X86] combineConcatVectorOps - consistently use EltSizeInBits. NFCI.
Avoid repeated VT.getScalarSizeInBits() calls
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 b16c980746d077..284c2c54b7fcd4 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -54477,7 +54477,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
case X86ISD::UNPCKH:
case X86ISD::UNPCKL: {
// Don't concatenate build_vector patterns.
- if (!IsSplat && VT.getScalarSizeInBits() >= 32 &&
+ if (!IsSplat && EltSizeInBits >= 32 &&
((VT.is256BitVector() && Subtarget.hasInt256()) ||
(VT.is512BitVector() && Subtarget.useAVX512Regs())) &&
none_of(Ops, [](SDValue Op) {
@@ -54502,7 +54502,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
}
[[fallthrough]];
case X86ISD::VPERMILPI:
- if (!IsSplat && VT.getScalarSizeInBits() == 32 &&
+ if (!IsSplat && EltSizeInBits == 32 &&
(VT.is256BitVector() ||
(VT.is512BitVector() && Subtarget.useAVX512Regs())) &&
all_of(Ops, [&Op0](SDValue Op) {
More information about the llvm-commits
mailing list