<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>It's a bit of a tango, but enclosed is the patch I'll check in. The i386 and ppc patches are dependent because of the change to LLVM_TARGET_INTRINSIC_LOWER. Below are additional changes to rs6000.h (marked in red).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">Index: gcc/config/rs6000/rs6000.h</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">===================================================================</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">--- gcc/config/rs6000/rs6000.h</SPAN></FONT></FONT><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">(revision 121615)</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+++ gcc/config/rs6000/rs6000.h</SPAN></FONT></FONT><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">(working copy)</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">@@ -3655,7 +3655,7 @@</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Cache = M->getOrInsertFunction(NAME, FT); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> } \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Value *Offset = OPS[OPNUM], *Ptr = OPS[OPNUM+1]; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">- Ptr = CastToType(Ptr, VoidPtrTy); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ Ptr = CastToType(Instruction::BitCast, Ptr, VoidPtrTy); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> if (!isa<Constant>(Offset) || !cast<Constant>(Offset)->isNullValue()) \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Ptr = new GetElementPtrInst(Ptr, Offset, "tmp", CURBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> OPS.erase(OPS.begin()+OPNUM); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">@@ -3685,6 +3685,27 @@</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> ((TY == Type::SByteTy) ? 'b' : \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> ((TY == Type::FloatTy) ? 'f' : 'x'))))</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> </SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+/* LLVM_TARGET_INTRINSIC_CAST_RESULT - This macro just provides a frequently</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ * used sequence for use inside LLVM_TARGET_INTRINSIC_LOWER. Note that this</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ * macro assumes it is being invoked from inside LLVM_TARGET_INTRINSC_LOWER</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ * (see below) because it requires the "ResIsSigned" and "ExpIsSigned" macro </SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ * arguments in order to derive signedness for the cast.</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ */</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+#define LLVM_TARGET_INTRINSIC_CAST_RESULT(RESULT, RESISSIGNED, DESTTY, \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ EXPISSIGNED) \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ { Instruction::CastOps opcode = CastInst::getCastOpcode(RESULT, \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ RESISSIGNED, DESTTY, EXPISSIGNED); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ RESULT = CastInst::create(opcode, RESULT, DESTTY, "tmp", CurBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ } </SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+/* LLVM_INTRINSIC_OP_IS_SIGNED - This macro determines if a given operand</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ * to the intrinsic is signed or not. Note that this macro assumes it is being</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ * invoked from inside LLVM_TARGET_INTRINSIC_LOWER (see below) because it </SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ * requires the "exp" macro argument in order to determine signedness</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ */</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+#define LLVM_INTRINSIC_OP_IS_SIGNED(EXP, OPNUM) \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ !TYPE_UNSIGNED(TREE_TYPE(TREE_OPERAND(EXP, (OPNUM+1))))</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> /* LLVM_TARGET_INTRINSIC_LOWER - For builtins that we want to expand to normal</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> * LLVM code, emit the code now. If we can handle the code, this macro should</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> * emit the code, return true. Note that this would be much better as a</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">@@ -3693,7 +3714,8 @@</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> * use methods it defines.</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> */</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508"> #define LLVM_TARGET_INTRINSIC_LOWER(BUILTIN_CODE, DESTLOC, RESULT, \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">- DESTTY, OPS, CURBB) \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ DESTTY, OPS, CURBB, EXP, RESISSIGNED, \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ EXPISSIGNED) \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> switch (BUILTIN_CODE) { \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> default: break; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> case ALTIVEC_BUILTIN_VADDFP: \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">@@ -3827,34 +3849,39 @@</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> /* Map all of these to a shuffle. */ \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> unsigned Amt = Elt->getZExtValue() & 15; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> PackedType *v16i8 = PackedType::get(Type::SByteTy, 16); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">- OPS[0] = CastToType(OPS[0], v16i8); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">- OPS[1] = CastToType(OPS[1], v16i8); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ Value *Op0 = OPS[0]; \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ Instruction::CastOps opc = CastInst::getCastOpcode( \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ Op0, Op0->getType()->isSigned(), DESTTY, DESTTY->isSigned()); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ OPS[0] = CastToType(opc, Op0, v16i8); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ Value *Op1 = OPS[1]; \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ opc = CastInst::getCastOpcode( \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ Op1, Op1->getType()->isSigned(), DESTTY, DESTTY->isSigned()); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ OPS[1] = CastToType(opc, Op1, v16i8); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> RESULT = BuildVectorShuffle(OPS[0], OPS[1], \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Amt, Amt+1, Amt+2, Amt+3, \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Amt+4, Amt+5, Amt+6, Amt+7, \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Amt+8, Amt+9, Amt+10, Amt+11, \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Amt+12, Amt+13, Amt+14, Amt+15); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- RESULT = CastToType(RESULT, DESTTY); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> return true; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> } \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> return false; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> case ALTIVEC_BUILTIN_VPKUHUM: { \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- Instruction::CastOps opc = CastInst::getCastOpcode( \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- OPS[0], OPS[0]->getType()->isSigned(), DESTTY, DESTTY->isSigned()); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ Instruction::CastOps opc = CastInst::getCastOpcode(OPS[0], \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ LLVM_INTRINSIC_OP_IS_SIGNED(EXP,0), DESTTY, EXPISSIGNED); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> OPS[0] = CastInst::create(opc, OPS[0], DESTTY, OPS[0]->getName(), CurBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- opc = CastInst::getCastOpcode( \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- OPS[1], OPS[1]->getType()->isSigned(), DESTTY, DESTTY->isSigned()); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ opc = CastInst::getCastOpcode(OPS[1], \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ LLVM_INTRINSIC_OP_IS_SIGNED(EXP,1), DESTTY, EXPISSIGNED); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> OPS[1] = CastInst::create(opc, OPS[1], DESTTY, OPS[0]->getName(), CurBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> RESULT = BuildVectorShuffle(OPS[0], OPS[1], 1, 3, 5, 7, 9, 11, 13, 15, \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> 17, 19, 21, 23, 25, 27, 29, 31); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> return true; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> } \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> case ALTIVEC_BUILTIN_VPKUWUM: { \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- Instruction::CastOps opc = CastInst::getCastOpcode( \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- OPS[0], OPS[0]->getType()->isSigned(), DESTTY, DESTTY->isSigned()); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ Instruction::CastOps opc = CastInst::getCastOpcode(OPS[0], \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ LLVM_INTRINSIC_OP_IS_SIGNED(EXP,0), DESTTY, EXPISSIGNED); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> OPS[0] = CastInst::create(opc, OPS[0], DESTTY, OPS[0]->getName(), CurBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- opc = CastInst::getCastOpcode( \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- OPS[1], OPS[1]->getType()->isSigned(), DESTTY, DESTTY->isSigned()); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ opc = CastInst::getCastOpcode(OPS[1], \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"><FONT class="Apple-style-span" color="#FF0508">+ LLVM_INTRINSIC_OP_IS_SIGNED(EXP,1), DESTTY, EXPISSIGNED); \</FONT></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> OPS[1] = CastInst::create(opc, OPS[1], DESTTY, OPS[0]->getName(), CurBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> RESULT = BuildVectorShuffle(OPS[0], OPS[1], 1, 3, 5, 7, 9, 11, 13, 15); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> return true; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">@@ -3888,9 +3915,7 @@</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> Constant *C = ConstantInt::get(Type::IntTy, 0x7FFFFFFF); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> C = ConstantPacked::get(std::vector<Constant*>(4, C)); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> RESULT = BinaryOperator::createAnd(OPS[0], C, "tmp", CurBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- Instruction::CastOps opcode = CastInst::getCastOpcode( \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- RESULT, RESULT->getType()->isSigned(), DESTTY, DESTTY->isSigned()); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">- RESULT = CastInst::create(opcode, RESULT, DESTTY, "tmp", CurBB); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;">+ LLVM_TARGET_INTRINSIC_CAST_RESULT(RESULT,RESISSIGNED,DESTTY,EXPISSIGNED); \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> return true; \</SPAN></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Monaco" size="1"><SPAN class="Apple-style-span" style="font-size: 9px;"> } \</SPAN></FONT></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>-- Jim</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV></DIV></BODY></HTML>