From 5db99442e463cfeebf02b41a0edb7664af893f66 Mon Sep 17 00:00:00 2001 From: Mon P Wang Date: Fri, 30 Jan 2009 07:07:40 +0000 Subject: [PATCH] When PerformBuildVectorCombine, avoid creating a X86ISD::VZEXT_LOAD of an illegal type. llvm-svn: 63380 --- lib/Target/X86/X86ISelLowering.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index bf7c704b9ba..e17ae99b5c9 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -7601,7 +7601,11 @@ static SDValue PerformBuildVectorCombine(SDNode *N, SelectionDAG &DAG, // Load must not be an extload. if (LD->getExtensionType() != ISD::NON_EXTLOAD) return SDValue(); - + + // Load type should legal type so we don't have to legalize it. + if (!TLI.isTypeLegal(VT)) + return SDValue(); + SDVTList Tys = DAG.getVTList(VT, MVT::Other); SDValue Ops[] = { LD->getChain(), LD->getBasePtr() }; SDValue ResNode = DAG.getNode(X86ISD::VZEXT_LOAD, Tys, Ops, 2);