Revision: 129004 Author: clattner Date: 2007-06-30 11:35:54 -0700 (Sat, 30 Jun 2007)
Log Message: ----------- Fix an assertion failure on __builtin_ia32_vec_set_v8hi with a literal integer. GCC produces this as 32-bit integer, not a 16-bit integer. Modified Paths: -------------- apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp Modified: apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp =================================================================== --- apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp 2007-06-30 11:28:57 UTC (rev 129003) +++ apple-local/branches/llvm/gcc/config/i386/llvm-i386.cpp 2007-06-30 18:35:54 UTC (rev 129004) @@ -448,6 +448,8 @@ Result = Builder.CreateExtractElement(Ops[0], Ops[1], "tmp"); return true; case IX86_BUILTIN_VEC_SET_V8HI: + // GCC sometimes doesn't produce the right element type. + Ops[1] = Builder.CreateIntCast(Ops[1], Type::Int16Ty, false, "tmp"); Result = Builder.CreateInsertElement(Ops[0], Ops[1], Ops[2], "tmp"); return true; case IX86_BUILTIN_CMPEQPS: _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits