[llvm] [llubi] Add basic support for vector and aggregate ops (PR #181544)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 15 06:18:57 PST 2026
================
@@ -0,0 +1,31 @@
+; NOTE: Assertions have been autogenerated by utils/update_llubi_test_checks.py UTC_ARGS: --version 6
+; RUN: llubi --verbose < %s 2>&1 | FileCheck %s
+
+define void @main() {
+ %insert = insertelement <4 x i32> poison, i32 42, i32 0
+ %splat = shufflevector <4 x i32> %insert, <4 x i32> poison, <4 x i32> zeroinitializer
+ %extract = extractelement <4 x i32> %splat, i32 3
+
+ %insert_poison = insertelement <4 x i32> zeroinitializer, i32 42, i32 5
+ %extract_poison = extractelement <4 x i32> zeroinitializer, i32 5
+
+ ; TODO: Add support for ConstantExpr
+ ; %scalable_insert = insertelement <vscale x i32> poison, i32 42, i32 0
+ ; %scalable_splat = shufflevector <vscale x i32> %scalable_insert, <vscale x i32> poison, <vscale x i32> zeroinitializer
+ ; %scalable_extract = extractelement <vscale x i32> %scalable_splat, i32 3
+
+ %insert_update = insertelement <4 x i32> <i32 0, i32 poison, i32 2, i32 3>, i32 1, i32 1
+ %shuffle_mixed = shufflevector <4 x i32> <i32 0, i32 poison, i32 2, i32 3>, <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32> <i32 7, i32 1, i32 poison, i32 0>
----------------
nikic wrote:
Test a shufflevector where the result size doesn't match the operand size?
https://github.com/llvm/llvm-project/pull/181544
More information about the llvm-commits
mailing list