summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-02-28 00:26:45 +0000
committerHal Finkel <hfinkel@anl.gov>2014-02-28 00:26:45 +0000
commitab51ecd4fcf3cdb600d7d41a8b8fe4d3728fecf7 (patch)
treede7e3280452086213012259bd03e9735288715d1 /llvm/lib/CodeGen/SelectionDAG
parent7ffb2b0b536886b1954a82125147ec99f5023335 (diff)
downloadbcm5719-llvm-ab51ecd4fcf3cdb600d7d41a8b8fe4d3728fecf7.tar.gz
bcm5719-llvm-ab51ecd4fcf3cdb600d7d41a8b8fe4d3728fecf7.zip
Fix visitTRUNCATE for legal i1 values
This extract-and-trunc vector optimization cannot work for i1 values as currently implemented, and so I'm disabling this for now for i1 values. In the future, this can be fixed properly. Soon I'll commit support for i1 CR bit tracking in the PowerPC backend, and this will be covered by one of the existing regression tests. llvm-svn: 202449
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 3a522105f90..50578502389 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -5808,7 +5808,7 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
// creates this pattern) and before operation legalization after which
// we need to be more careful about the vector instructions that we generate.
if (N0.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
- LegalTypes && !LegalOperations && N0->hasOneUse()) {
+ LegalTypes && !LegalOperations && N0->hasOneUse() && VT != MVT::i1) {
EVT VecTy = N0.getOperand(0).getValueType();
EVT ExTy = N0.getValueType();
OpenPOWER on IntegriCloud