On Mon, 2006-11-27 at 09:54 -0400, Jim Laskey wrote:
> Reid,
> 
> Your ConvertInst changes are not in the llvm tree as yet, 

Oops. Please apply the attached patch for rs6000.h.

Thanks,

Reid.

> so this  
> fails to build on PowerPC.  Won't make today's llvm-gcc mirror.

Hmm .. you mean config/
> 
> Cheers,
> 
> -- Jim
> 
> 
> On Nov 26, 2006, at 9:30 PM, Reid Spencer wrote:
> 
> > The LLVM Cast patch has been committed. Please commit this patch to
> > llvm-gcc as soon as possible so nightly tests don't break for too  
> > long.
> >
> > If you're maintaining your own llvm-gcc source, please apply this  
> > to SVN
> > revision 210 if you update LLVM.
> >
> > Thanks,
> >
> > Reid.
> >
> > <CAST-llvmgcc.patch>
> 
Index: gcc/config/rs6000/rs6000.h
===================================================================
--- gcc/config/rs6000/rs6000.h	(revision 210)
+++ gcc/config/rs6000/rs6000.h	(working copy)
@@ -3854,14 +3854,14 @@
     }                                                                         \
     return false;                                                             \
   case ALTIVEC_BUILTIN_VPKUHUM:                                               \
-    OPS[0] = new CastInst(OPS[0], DESTTY, OPS[0]->getName(), CurBB);          \
-    OPS[1] = new CastInst(OPS[1], DESTTY, OPS[0]->getName(), CurBB);          \
+    OPS[0] = CastInst::createInferredCast(OPS[0], DESTTY, OPS[0]->getName(), CurBB);  \
+    OPS[1] = CastInst::createInferredCast(OPS[1], DESTTY, OPS[0]->getName(), CurBB);  \
     RESULT = BuildVectorShuffle(OPS[0], OPS[1], 1, 3, 5, 7, 9, 11, 13, 15,    \
                                 17, 19, 21, 23, 25, 27, 29, 31);              \
     return true;                                                              \
   case ALTIVEC_BUILTIN_VPKUWUM:                                               \
-    OPS[0] = new CastInst(OPS[0], DESTTY, OPS[0]->getName(), CurBB);          \
-    OPS[1] = new CastInst(OPS[1], DESTTY, OPS[0]->getName(), CurBB);          \
+    OPS[0] = CastInst::createInferredCast(OPS[0], DESTTY, OPS[0]->getName(), CurBB);  \
+    OPS[1] = CastInst::createInferredCast(OPS[1], DESTTY, OPS[0]->getName(), CurBB);  \
     RESULT = BuildVectorShuffle(OPS[0], OPS[1], 1, 3, 5, 7, 9, 11, 13, 15);   \
     return true;                                                              \
   case ALTIVEC_BUILTIN_VMRGHB:                                                \
@@ -3889,11 +3889,12 @@
   case ALTIVEC_BUILTIN_ABS_V4SF: {                                            \
     /* and out sign bits */                                                   \
     PackedType *v4i32 = PackedType::get(Type::IntTy, 4);                      \
-    OPS[0] = new CastInst(OPS[0], v4i32, OPS[0]->getName(), CurBB);           \
-    Constant *C = ConstantInt::get(Type::IntTy, 0x7FFFFFFF);                 \
+    OPS[0] = CastInst::createInferredCast(OPS[0], v4i32, OPS[0]->getName(),   \
+        CurBB);                                                               \
+    Constant *C = ConstantInt::get(Type::IntTy, 0x7FFFFFFF);                  \
     C = ConstantPacked::get(std::vector<Constant*>(4, C));                    \
     RESULT = BinaryOperator::createAnd(OPS[0], C, "tmp", CurBB);              \
-    RESULT = new CastInst(RESULT, DESTTY, "tmp", CurBB);                      \
+    RESULT = CastInst::createInferredCast(RESULT, DESTTY, "tmp", CurBB);      \
     return true;                                                              \
   }                                                                           \
   case ALTIVEC_BUILTIN_ABS_V4SI:                                              \
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to