[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu May 1 14:01:22 PDT 2025


================
@@ -39,23 +39,43 @@ vi4 d = { 1, 2, 3, 4 };
 
 // OGCG: @[[VEC_D:.*]] = global <4 x i32> <i32 1, i32 2, i32 3, i32 4>
 
-void vec_int_test() {
+int x = 5;
+
+void foo() {
   vi4 a;
   vd2 b;
   vll2 c;
+
+  vi4 d = { 1, 2, 3, 4 };
+
+  vi4 e = { x, 5, 6, x + 1 };
----------------
andykaylor wrote:

Can you add a test case where the initializer list doesn't fill the entire vector?

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


More information about the cfe-commits mailing list