[llvm] r340688 - [X86] Make sure type is a vector before calling VT.getVectorNumElements() in combineLoopMAddPattern
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 25 10:23:43 PDT 2018
Author: ctopper
Date: Sat Aug 25 10:23:43 2018
New Revision: 340688
URL: http://llvm.org/viewvc/llvm-project?rev=340688&view=rev
Log:
[X86] Make sure type is a vector before calling VT.getVectorNumElements() in combineLoopMAddPattern
Fixes PR38700.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=340688&r1=340687&r2=340688&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Aug 25 10:23:43 2018
@@ -39076,7 +39076,7 @@ static SDValue combineLoopMAddPattern(SD
// If the vector size is less than 128, or greater than the supported RegSize,
// do not use PMADD.
- if (VT.getVectorNumElements() < 8)
+ if (!VT.isVector() || VT.getVectorNumElements() < 8)
return SDValue();
if (Op0.getOpcode() != ISD::MUL)
More information about the llvm-commits
mailing list