1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -mtriple aarch64 -O0 -stop-after=instruction-select -global-isel -verify-machineinstrs %s -o - 2>&1 | FileCheck %s
4 %dag = type { { { i8, { i8 } }, { { i8, { i8 } }, { i8 } } }, { { i8, { i8 } }, { i8 } } }
6 define void @test_const(%dag* %dst) {
7 ; CHECK-LABEL: name: test_const
10 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
11 ; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 10
12 ; CHECK: [[MOVi32imm1:%[0-9]+]]:gpr32 = MOVi32imm 20
13 ; CHECK: [[MOVi32imm2:%[0-9]+]]:gpr32 = MOVi32imm 50
14 ; CHECK: STRBBui [[MOVi32imm]], [[COPY]], 0 :: (store 1 into %ir.dst)
15 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 1 :: (store 1 into %ir.dst + 1)
16 ; CHECK: STRBBui [[MOVi32imm]], [[COPY]], 2 :: (store 1 into %ir.dst + 2)
17 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 3 :: (store 1 into %ir.dst + 3)
18 ; CHECK: STRBBui [[MOVi32imm2]], [[COPY]], 4 :: (store 1 into %ir.dst + 4)
19 ; CHECK: STRBBui [[MOVi32imm]], [[COPY]], 5 :: (store 1 into %ir.dst + 5)
20 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 6 :: (store 1 into %ir.dst + 6)
21 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 7 :: (store 1 into %ir.dst + 7)
22 ; CHECK: STRBBui [[MOVi32imm]], [[COPY]], 0 :: (store 1 into %ir.dst)
23 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 1 :: (store 1 into %ir.dst + 1)
24 ; CHECK: STRBBui [[MOVi32imm]], [[COPY]], 2 :: (store 1 into %ir.dst + 2)
25 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 3 :: (store 1 into %ir.dst + 3)
26 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 4 :: (store 1 into %ir.dst + 4)
27 ; CHECK: STRBBui [[MOVi32imm]], [[COPY]], 5 :: (store 1 into %ir.dst + 5)
28 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 6 :: (store 1 into %ir.dst + 6)
29 ; CHECK: STRBBui [[MOVi32imm1]], [[COPY]], 7 :: (store 1 into %ir.dst + 7)
32 %updated = insertvalue
33 ; Check that we're visiting constants with shared parts
34 ; (deduplicated via LLVMContext, forming a proper DAG) correctly:
36 { { i8, { i8 } }, { { i8, { i8 } }, { i8 } } } {
41 { { i8, { i8 } }, { i8 } } {
49 { { i8, { i8 } }, { i8 } } {
57 { { i8, { i8 } }, { i8 } } {
66 store %dag %updated, %dag* %dst
67 ; 10, 20, 10, 20, 50, 10, 20, 20 sequence is expected
70 ; Check that we didn't overwrite a previously seen constant
71 ; while processing an insertvalue into it:
73 { { i8, { i8 } }, { { i8, { i8 } }, { i8 } } } {
78 { { i8, { i8 } }, { i8 } } {
86 { { i8, { i8 } }, { i8 } } {
95 ; 10, 20, 10, 20, 20, 10, 20, 20 sequence is expected