Skip to content

Commit c1c86f9

Browse files
committed
[X86] LowerEXTRACT_VECTOR_ELT - match i8 extraction with MVT::i8 instead of getSizeInBits()
Noticed on D156350
1 parent 0ef39e3 commit c1c86f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17662,7 +17662,7 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
1766217662

1766317663
if (!IdxC) {
1766417664
// Its more profitable to go through memory (1 cycles throughput)
17665-
// than using VMOVD + VPERMV/PSHUFB sequence ( 2/3 cycles throughput)
17665+
// than using VMOVD + VPERMV/PSHUFB sequence (2/3 cycles throughput)
1766617666
// IACA tool was used to get performance estimation
1766717667
// (https://software.intel.com/en-us/articles/intel-architecture-code-analyzer)
1766817668
//
@@ -17742,7 +17742,7 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
1774217742
// TODO: We only extract a single element from v16i8, we can probably afford
1774317743
// to be more aggressive here before using the default approach of spilling to
1774417744
// stack.
17745-
if (VT.getSizeInBits() == 8 && Op->isOnlyUserOf(Vec.getNode())) {
17745+
if (VT == MVT::i8 && Op->isOnlyUserOf(Vec.getNode())) {
1774617746
// Extract either the lowest i32 or any i16, and extract the sub-byte.
1774717747
int DWordIdx = IdxVal / 4;
1774817748
if (DWordIdx == 0) {

0 commit comments

Comments
 (0)