diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-09-01 18:15:06 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-09-01 18:15:06 +0000 |
| commit | a39ccdb9d4829548756efaaac0d19ebae8b7ff5d (patch) | |
| tree | 05ee8b89c3b1b0c1196bd23e331bfba2be56cd9a /lib | |
| parent | c047dcade506a5acaccb1548cb83a3f85f52d71d (diff) | |
Fix vbroadcast matching logic to early unmatch if the node doesn't have
only one use. Fix PR10825.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 0d45414930..706b1a2f80 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -6409,12 +6409,16 @@ static bool isVectorBroadcast(SDValue &Op) { if (Is256) V = V.getOperand(1); - if (V.hasOneUse() && V.getOpcode() != ISD::SCALAR_TO_VECTOR) + + if (!V.hasOneUse()) return false; // Check the source scalar_to_vector type. 256-bit broadcasts are // supported for 32/64-bit sizes, while 128-bit ones are only supported // for 32-bit scalars. + if (V.getOpcode() != ISD::SCALAR_TO_VECTOR) + return false; + unsigned ScalarSize = V.getOperand(0).getValueType().getSizeInBits(); if (ScalarSize != 32 && ScalarSize != 64) return false; |
