diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-02-01 06:51:58 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-02-01 06:51:58 +0000 |
commit | a1902a18cd289d9554f5649324c5ad27109586bb (patch) | |
tree | c2a6274d237dbf0f0628c97e11d50be35cfcfb7c | |
parent | 478eed85f96f0d93da43e26cfb7fc6dee981c9aa (diff) |
Don't create VBROADCAST nodes if any nodes use the chain result from the load. Fixes PR11900.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149478 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 90cd3d3b74..2ce883a170 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -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(); |