[llvm-commits] [123561] shift-related cleanups, patch by Reid!
    clattner at apple.com 
    clattner at apple.com
       
    Wed Feb  7 15:12:06 PST 2007
    
    
  
Revision: 123561
Author:   clattner
Date:     2007-02-07 15:12:06 -0800 (Wed, 07 Feb 2007)
Log Message:
-----------
shift-related cleanups, patch by Reid!
Modified Paths:
--------------
    apple-local/branches/llvm/gcc/llvm-convert.cpp
Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===================================================================
--- apple-local/branches/llvm/gcc/llvm-convert.cpp	2007-02-07 22:45:31 UTC (rev 123560)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp	2007-02-07 23:12:06 UTC (rev 123561)
@@ -1827,13 +1827,13 @@
     if (LV.BitStart+LV.BitSize != ValSizeInBits) {
       Value *ShAmt = ConstantInt::get(Val->getType(),
                                        ValSizeInBits-(LV.BitStart+LV.BitSize));
-      Val = BinaryOperator::create(Instruction::Shl, Val, ShAmt, "tmp", CurBB);
+      Val = BinaryOperator::createShl(Val, ShAmt, "tmp", CurBB);
     }
     
     // Shift right required?
     if (ValSizeInBits-LV.BitSize) {
       Value *ShAmt = ConstantInt::get(Val->getType(), ValSizeInBits-LV.BitSize);
-      Val = BinaryOperator::create( TYPE_UNSIGNED(TREE_TYPE(exp)) ? 
+      Val = BinaryOperator::create(TYPE_UNSIGNED(TREE_TYPE(exp)) ? 
         Instruction::LShr : Instruction::AShr, Val, ShAmt, "tmp", CurBB);
     }
 
@@ -2232,7 +2232,7 @@
   Value *RetVal = RHS;
   RHS = CastToAnyType(RHS, Op1Signed, OldVal->getType(), Op0Signed);
   if (LV.BitStart)
-    RHS = BinaryOperator::create(Instruction::Shl, RHS,
+    RHS = BinaryOperator::createShl(RHS,
                         ConstantInt::get(RHS->getType(), LV.BitStart),
                         "tmp", CurBB);
   // Next, if this doesn't touch the top bit, mask out any bits that shouldn't
    
    
More information about the llvm-commits
mailing list