[DAGCombiner] Fix a regression in method SimplifyVBinOp accidentally introduced by r199135.

Andrea Di Biagio andrea.dibiagio at gmail.com
Wed Jan 15 11:57:21 PST 2014


Committed revision 199328.

On Wed, Jan 15, 2014 at 7:21 PM, Andrea Di Biagio
<andrea.dibiagio at gmail.com> wrote:
> Thanks Juergen for looking into this!
>
> I will modify the test removing the usage of FileCheck and commit the change.
>
> Andrea
>
> On Wed, Jan 15, 2014 at 7:07 PM, Juergen Ributzka <juergen at apple.com> wrote:
>> Hi Andrea,
>>
>> that was a big think-o on my side. Thanks for catching this.
>>
>> In your patch the test case only checks if the code compiles. In this case we don't really need the FileCheck.
>> Otherwise the patch LGTM.
>>
>> Cheers,
>> Juergen
>>
>> On Jan 15, 2014, at 4:50 AM, Andrea Di Biagio <andrea.dibiagio at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> this patch fixes a bug introduced by revision 199135 in method
>>> DAGCombiner::SimplifyVBinOp'.
>>>
>>> Revision 199135 tried to simplify part of the logic in method
>>> DAGCombiner::SimplifyVBinOp' introducing calls to method
>>> 'BuildVectorSDNode::isConstant().
>>>
>>> However, that revision wrongly changed the check performed by method
>>> DAGCombiner::SimplifyVBinOp to identify dag nodes that can be folded.
>>>
>>> Before revision 199135, that method only tried to simplify vector
>>> binary operations if both operands were build_vector of
>>> Constant/ConstantFP/Undef only.
>>>
>>> After revision 199135, method 'SimplifyVBinOp' behaves differently; it
>>> attempts to simplify vector binary operations even if only one of the
>>> two operands is a constant.
>>>
>>> The regression was originally reported by Patrik Hägglund H.
>>> I reduced the original test case provided by Patrik and adapted it to
>>> the regression suite (see file
>>> test/CodeGen/X86/vbinop-simplify-bug.ll).
>>>
>>> Please let me know if ok to submit.
>>>
>>> Thanks,
>>> Andrea Di Biagio
>>> SN Systems - Sony Computer Entertainment Group.
>>> <patch-simplify-vbinop.diff>
>>




More information about the llvm-commits mailing list