[llvm] r216928 - Fix comment and unnecessary check for FP build_vectors.

Matt Arsenault Matthew.Arsenault at amd.com
Tue Sep 2 11:33:52 PDT 2014


Author: arsenm
Date: Tue Sep  2 13:33:51 2014
New Revision: 216928

URL: http://llvm.org/viewvc/llvm-project?rev=216928&view=rev
Log:
Fix comment and unnecessary check for FP build_vectors.

This was copy-paste from the integer version, but
FP build_vectors don't truncate.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=216928&r1=216927&r2=216928&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Sep  2 13:33:51 2014
@@ -711,11 +711,7 @@ static ConstantFPSDNode *isConstOrConstS
     BitVector UndefElements;
     ConstantFPSDNode *CN = BV->getConstantFPSplatNode(&UndefElements);
 
-    // BuildVectors can truncate their operands. Ignore that case here.
-    // FIXME: We blindly ignore splats which include undef which is overly
-    // pessimistic.
-    if (CN && UndefElements.none() &&
-        CN->getValueType(0) == N.getValueType().getScalarType())
+    if (CN && UndefElements.none())
       return CN;
   }
 





More information about the llvm-commits mailing list