summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/phi-select-constexpr.ll
Commit message (Collapse)AuthorAgeFilesLines
* rename instcombine test file. NFCAnna Thomas2017-03-281-57/+0
| | | | llvm-svn: 298904
* [InstCombine] Avoid incorrect folding of select into phi nodes when incoming ↵Anna Thomas2017-03-271-0/+38
| | | | | | | | | | | | | | | | | | | | | | element is a vector type Summary: We are incorrectly folding selects into phi nodes when the incoming value of a phi node is a constant vector. This optimization is done in `FoldOpIntoPhi` when the select condition is a phi node with constant incoming values. Without the fix, we are miscompiling (i.e. incorrectly folding the select into the phi node) when the vector contains non-zero elements. This patch fixes the miscompile and we will correctly fold based on the select vector operand (see added test cases). Reviewers: majnemer, sanjoy, spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31189 llvm-svn: 298845
* Don't use isNullValue to evaluate ConstantExprDuncan P. N. Exon Smith2013-12-061-0/+19
ConstantExpr can evaluate to false even when isNullValue gives false. Fixes PR18143. llvm-svn: 196611
OpenPOWER on IntegriCloud