[llvm-branch-commits] [llvm] [LoongArch] Add support for vector add/sub on vNi128 types (PR #193912)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Apr 29 01:19:49 PDT 2026


================
@@ -90,9 +90,11 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,
     addRegisterClass(MVT::f64, &LoongArch::FPR64RegClass);
 
   static const MVT::SimpleValueType LSXVTs[] = {
-      MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v2i64, MVT::v4f32, MVT::v2f64};
+      MVT::v16i8,  MVT::v8i16, MVT::v4i32, MVT::v2i64,
+      MVT::v1i128, MVT::v4f32, MVT::v2f64};
----------------
wangleiat wrote:

I noticed these two types(v1i128/v2i128) were recently introduced. Can we guarantee they won’t be generated in other cases beyond the test scenarios? I’m concerned that directly adding vNi128 into LSXVTs/LASXVTs may affect the default behavior of some nodes—for example, making load/store on vNi128 legal—while we don’t yet have the corresponding matching patterns in place.

https://github.com/llvm/llvm-project/pull/193912


More information about the llvm-branch-commits mailing list