summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/zext-phi.ll
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] treat i1 as a special type in shouldChangeType()Sanjay Patel2017-02-031-3/+6
| | | | | | | | | | | | | | | | | | | | This patch is based on the llvm-dev discussion here: http://lists.llvm.org/pipermail/llvm-dev/2017-January/109631.html Folding to i1 should always be desirable because that's better for value tracking and we have special folds for i1 types. I checked for other users of shouldChangeType() where this might have an effect, but we already handle the i1 case differently than other types in all of those cases. Side note: the default datalayout includes i1, so it seems we only find this gap in shouldChangeType + phi folding for the case when there is (1) an explicit datalayout without i1, (2) casting to i1 from a legal type, and (3) a phi with exactly 2 incoming casted operands (as Björn mentioned). Differential Revision: https://reviews.llvm.org/D29336 llvm-svn: 294066
* [InstCombine] add test for possible zext-phi transform; NFCSanjay Patel2017-01-311-0/+29
The datalayout doesn't include i1, so we don't do a potential shrink and sink transform. Example based on discussion here: http://lists.llvm.org/pipermail/llvm-dev/2017-January/109631.html llvm-svn: 293656
OpenPOWER on IntegriCloud