Don't create VBROADCAST nodes if any nodes use the chain result from the load. Fixes PR11900.

llvm-svn: 149478
This commit is contained in:
Craig Topper 2012-02-01 06:51:58 +00:00
parent a11b35a9b0
commit 9cdb8bdf04
1 changed files with 4 additions and 0 deletions

View File

@ -4997,6 +4997,10 @@ static SDValue isVectorBroadcast(SDValue &Op, const X86Subtarget *Subtarget) {
if (!ISD::isNormalLoad(Ld.getNode()))
return SDValue();
// Reject loads that have uses of the chain result
if (Ld->hasAnyUseOfValue(1))
return SDValue();
bool Is256 = VT.getSizeInBits() == 256;
bool Is128 = VT.getSizeInBits() == 128;
unsigned ScalarSize = Ld.getValueType().getSizeInBits();