[llvm-commits] Fix the AND dag node folding
Silviu Baranga
silbar01 at arm.com
Thu Aug 23 08:54:34 PDT 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 1813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120823/1e34fdcc/attachment.obj>
More information about the llvm-commits
mailing list