[llvm-commits] Fix the AND dag node folding

Silviu Baranga silbar01 at arm.com
Wed Aug 29 07:24:41 PDT 2012


Ping.

> -----Original Message-----
> From: Silviu Baranga [mailto:silbar01 at arm.com]
> Sent: 23 August 2012 16:55
> To: 'llvm-commits at cs.uiuc.edu'
> Subject: Fix the AND dag node folding
> 
> Hi,
> 
> There are currently some bugs in implementation of the folding of AND
> nodes
> in the DAG combiner which cause the DAG combiner to miss some folding
> opportunities when trying to fold "(and (load ([non_ext|zero_ext] V)))"
> on
> vector types.
> 
> The issues are:
> 1. The VT type was not corresponding to the input vector type when the
> LOAD
>    dag node was the operand of the LOAD node.
> 2. The isConstantSplat method does not always return a mask with values
> for
>    all the vector lanes (it reduces this mask when possible).
> 
> This produces a wrong value for the final mask (in Constant) in the
> case
> specified at 1), and the AND node will not get folded.
> 
> The attached patch fixes issue 1. and 2. and adds a regression test.
> 
> Please review.
> 
> Thanks,
> Silviu







More information about the llvm-commits mailing list