[llvm-commits] [llvm] r63170 - in /llvm/trunk/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp LegalizeVectorTypes.cpp

Dan Gohman gohman at apple.com
Tue Jan 27 19:10:52 PST 2009


Author: djg
Date: Tue Jan 27 21:10:52 2009
New Revision: 63170

URL: http://llvm.org/viewvc/llvm-project?rev=63170&view=rev
Log:
Use ValueType::bitsLT to simplify some code.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=63170&r1=63169&r2=63170&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Jan 27 21:10:52 2009
@@ -8515,7 +8515,7 @@
   // It must be true that we the widen vector type is bigger than where
   // we need to store.
   assert(StVT.isVector() && VVT.isVector());
-  assert(StVT.getSizeInBits() < VVT.getSizeInBits());
+  assert(StVT.bitsLT(VVT));
   assert(StVT.getVectorElementType() == VVT.getVectorElementType());
 
   // Store value

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=63170&r1=63169&r2=63170&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Tue Jan 27 21:10:52 2009
@@ -1865,7 +1865,7 @@
   // It must be true that we the widen vector type is bigger than where
   // we need to store.
   assert(StVT.isVector() && ValOp.getValueType().isVector());
-  assert(StVT.getSizeInBits() < ValOp.getValueType().getSizeInBits());
+  assert(StVT.bitsLT(ValOp.getValueType()));
 
   SmallVector<SDValue, 16> StChain;
   if (ST->isTruncatingStore()) {





More information about the llvm-commits mailing list