Skip to content

Commit 37cdac6

Browse files
committed
[X86] LowerAVXExtend - fix dodgy self-comparison assert.
PVS Studio noticed that we were asserting "VT.getVectorNumElements() == VT.getVectorNumElements()" instead of "VT.getVectorNumElements() == InVT.getVectorNumElements()".
1 parent d91ea7f commit 37cdac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19035,7 +19035,7 @@ static SDValue LowerAVXExtend(SDValue Op, SelectionDAG &DAG,
1903519035
assert(VT.isVector() && InVT.isVector() && "Expected vector type");
1903619036
assert((Opc == ISD::ANY_EXTEND || Opc == ISD::ZERO_EXTEND) &&
1903719037
"Unexpected extension opcode");
19038-
assert(VT.getVectorNumElements() == VT.getVectorNumElements() &&
19038+
assert(VT.getVectorNumElements() == InVT.getVectorNumElements() &&
1903919039
"Expected same number of elements");
1904019040
assert((VT.getVectorElementType() == MVT::i16 ||
1904119041
VT.getVectorElementType() == MVT::i32 ||

0 commit comments

Comments
 (0)