Skip to content

Commit 14cfbf8

Browse files
committed
[AIE2P] Add end-2-end test for i64 element vector insertions
1 parent a7d47c6 commit 14cfbf8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
;
3+
; This file is licensed under the Apache License v2.0 with LLVM Exceptions.
4+
; See https://llvm.org/LICENSE.txt for license information.
5+
; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
;
7+
; (c) Copyright 2025 Advanced Micro Devices, Inc. or its affiliates
8+
; RUN: llc -mtriple=aie2p -verify-machineinstrs -o - < %s | FileCheck %s
9+
10+
define dso_local noundef <64 x i8> @insert_element_64(<8 x i64> noundef %v, i32 noundef %idx, i64 noundef %b) local_unnamed_addr {
11+
; CHECK-LABEL: insert_element_64:
12+
; CHECK: .p2align 4
13+
; CHECK-NEXT: // %bb.0: // %entry
14+
; CHECK-NEXT: vlda bmll0, [sp, #-64]; nopb ; nops ; nopxm ; nopv
15+
; CHECK-NEXT: nopx
16+
; CHECK-NEXT: nop
17+
; CHECK-NEXT: mov r4, r1
18+
; CHECK-NEXT: ret lr
19+
; CHECK-NEXT: mov r29, r0 // Delay Slot 5
20+
; CHECK-NEXT: mov r5, r2 // Delay Slot 4
21+
; CHECK-NEXT: vmov x0, bmll0 // Delay Slot 3
22+
; CHECK-NEXT: vinsert.64 x0, x0, r29, r5:r4 // Delay Slot 2
23+
; CHECK-NEXT: nop // Delay Slot 1
24+
entry:
25+
%vecins.i.i = insertelement <8 x i64> %v, i64 %b, i32 %idx
26+
%2 = bitcast <8 x i64> %vecins.i.i to <64 x i8>
27+
ret <64 x i8> %2
28+
}

0 commit comments

Comments
 (0)