xref: /llvm-project/llvm/test/CodeGen/AArch64/GlobalISel/select-const-pool.mir (revision fae05692a36f9ebbd201d93c2a6b0f927564d7e6)
1# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
2---
3name:            test_constant_vec_pool_v2f64
4alignment:       4
5legalized:       true
6regBankSelected: true
7tracksRegLiveness: true
8liveins:
9  - { reg: '$x0' }
10frameInfo:
11  maxAlignment:    1
12machineFunctionInfo: {}
13body:             |
14  bb.1:
15    liveins: $x0
16    ; Check that we have an MMO on the load, which is needed for MachineLICM to hoist it.
17    ; CHECK-LABEL: name: test_constant_vec_pool_v2f64
18    ; CHECK: liveins: $x0
19    ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
20    ; CHECK: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) %const.0
21    ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) %const.0 :: (load (s128) from constant-pool)
22    ; CHECK: STRQui [[LDRQui]], [[COPY]], 0 :: (store (<2 x s64>))
23    ; CHECK: RET_ReallyLR
24    %0:gpr(p0) = COPY $x0
25    %3:fpr(s64) = G_FCONSTANT double 5.000000e-01
26    %2:fpr(s64) = G_FCONSTANT double 1.600000e+01
27    %1:fpr(<2 x s64>) = G_BUILD_VECTOR %2(s64), %3(s64)
28    G_STORE %1(<2 x s64>), %0(p0) :: (store (<2 x s64>))
29    RET_ReallyLR
30
31...
32