summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-03-02 01:36:51 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-03-02 01:36:51 +0000
commit7d0a77b9790364ed1c62ca4309ffa3f1a383de39 (patch)
treed77f07488e316cb3313882b3e53962a3ab3c2a0d /llvm/lib
parent0c8fad7dba60c38c9f11610af9eb4dee7c421634 (diff)
downloadbcm5719-llvm-7d0a77b9790364ed1c62ca4309ffa3f1a383de39.tar.gz
bcm5719-llvm-7d0a77b9790364ed1c62ca4309ffa3f1a383de39.zip
DAGCombiner: Make sure an integer is being truncated
llvm-svn: 262446
Diffstat (limited to 'llvm/lib')
-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 cde38e479ac..216389ac42a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -12198,7 +12198,7 @@ SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) {
// extract_vector_elt (v2i32 (bitcast i64:x)), 0 -> i32 (trunc i64:x)
if (ConstEltNo && InVec.getOpcode() == ISD::BITCAST && InVec.hasOneUse() &&
- ConstEltNo->isNullValue()) {
+ ConstEltNo->isNullValue() && VT.isInteger()) {
SDValue BCSrc = InVec.getOperand(0);
if (BCSrc.getValueType().isScalarInteger())
return DAG.getNode(ISD::TRUNCATE, SDLoc(N), NVT, BCSrc);
OpenPOWER on IntegriCloud