llvm.org GIT mirror llvm / 8fd4480
Mips: Remove immarg from copy and insert intrinsics These intrinsics do in fact work with non-constant index arguments. These are lowered to either the generic ISD::INSERT_VECTOR_ELT/ISD::EXTRACT_VECTOR_ELT, or to VEXTRACT_SEXT_ELT. The handling of these all accept variable indexes. Turning these into generic instructions which do allow variables introduces complications in a future change to immarg handling. Since these just turn into generic instructions, these are kind of pointless and should probably just be autoupgraded to extractelement/insertelement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366328 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 3 months ago
1 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
797797 Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
798798
799799 def int_mips_copy_s_b : GCCBuiltin<"__builtin_msa_copy_s_b">,
800 Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
800 Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
801801 def int_mips_copy_s_h : GCCBuiltin<"__builtin_msa_copy_s_h">,
802 Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
802 Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>;
803803 def int_mips_copy_s_w : GCCBuiltin<"__builtin_msa_copy_s_w">,
804 Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
804 Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>;
805805 def int_mips_copy_s_d : GCCBuiltin<"__builtin_msa_copy_s_d">,
806 Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
806 Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>;
807807
808808 def int_mips_copy_u_b : GCCBuiltin<"__builtin_msa_copy_u_b">,
809 Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
809 Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>;
810810 def int_mips_copy_u_h : GCCBuiltin<"__builtin_msa_copy_u_h">,
811 Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
811 Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>;
812812 def int_mips_copy_u_w : GCCBuiltin<"__builtin_msa_copy_u_w">,
813 Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
813 Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>;
814814 def int_mips_copy_u_d : GCCBuiltin<"__builtin_msa_copy_u_d">,
815 Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem, ImmArg<1>]>;
815 Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>;
816816
817817 def int_mips_ctcmsa : GCCBuiltin<"__builtin_msa_ctcmsa">,
818818 Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [ImmArg<0>]>;
12291229
12301230 def int_mips_insert_b : GCCBuiltin<"__builtin_msa_insert_b">,
12311231 Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty, llvm_i32_ty],
1232 [IntrNoMem, ImmArg<1>]>;
1232 [IntrNoMem]>;
12331233 def int_mips_insert_h : GCCBuiltin<"__builtin_msa_insert_h">,
12341234 Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty, llvm_i32_ty],
1235 [IntrNoMem, ImmArg<1>]>;
1235 [IntrNoMem]>;
12361236 def int_mips_insert_w : GCCBuiltin<"__builtin_msa_insert_w">,
12371237 Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty],
1238 [IntrNoMem, ImmArg<1>]>;
1238 [IntrNoMem]>;
12391239 def int_mips_insert_d : GCCBuiltin<"__builtin_msa_insert_d">,
12401240 Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty, llvm_i64_ty],
1241 [IntrNoMem, ImmArg<1>]>;
1241 [IntrNoMem]>;
12421242
12431243 def int_mips_insve_b : GCCBuiltin<"__builtin_msa_insve_b">,
12441244 Intrinsic<[llvm_v16i8_ty],