On Feb 2, 2008, at 11:18 PM, Nate Begeman wrote: > +// Vector insert > +let TargetPrefix = "x86" in { // All intrinsics start with > "llvm.x86.". > + def int_x86_sse41_pinsrb : > GCCBuiltin<"__builtin_ia32_vec_set_v16qi">, > + Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty, > llvm_i32_ty]>; > + def int_x86_sse41_pinsrd : > GCCBuiltin<"__builtin_ia32_vec_set_v4si">, > + Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty, > llvm_i32_ty]>; > + def int_x86_sse41_pinsrq : > GCCBuiltin<"__builtin_ia32_vec_set_v2di">, > + Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty, llvm_i64_ty, > llvm_i32_ty]>; > + def int_x86_sse41_insertps : > GCCBuiltin<"__builtin_ia32_insertps128">, > + Intrinsic<[llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, > llvm_i32_ty]>; > +}
Hey Nate, I think that some of these should be lowered in the front-end into the corresponding llvm instruction. For example, I think these should turn into insertelement instructions, and some of the other shuffles should turn into vector_shuffle instructions. This relies on the code generator to match the operations and turn them back into the "right thing" which ensures that the code generator aggressively matches the 'non intrinsic' forms of these operations when possible. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits