1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
4 name: test_128_fpr_truncation
8 tracksRegLiveness: true
10 ; CHECK-LABEL: name: test_128_fpr_truncation
12 ; CHECK: successors: %bb.1(0x80000000)
14 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
15 ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (load (s128))
16 ; CHECK: [[COPY1:%[0-9]+]]:gpr32all = COPY [[LDRQui]].ssub
17 ; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY [[COPY1]]
18 ; CHECK: TBNZW [[COPY2]], 0, %bb.1
24 %3:gpr(s64) = G_CONSTANT i64 1
25 %5:gpr(s64) = G_CONSTANT i64 0
26 %0:fpr(s128) = G_LOAD %1:gpr(p0) :: (load (s128))
27 %2:fpr(s64) = G_TRUNC %0:fpr(s128)
28 %8:gpr(s64) = COPY %2:fpr(s64)
29 %4:gpr(s64) = G_AND %8:gpr, %3:gpr
30 %7:gpr(s32) = G_ICMP intpred(ne), %4:gpr(s64), %5:gpr
41 tracksRegLiveness: true
43 ; CHECK-LABEL: name: no_trunc
45 ; CHECK: successors: %bb.1(0x80000000)
47 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
48 ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (load (s128))
49 ; CHECK: [[COPY1:%[0-9]+]]:gpr64all = COPY [[LDRQui]].dsub
50 ; CHECK: [[COPY2:%[0-9]+]]:gpr64 = COPY [[COPY1]]
51 ; CHECK: TBNZX [[COPY2]], 33, %bb.1
57 %3:gpr(s64) = G_CONSTANT i64 8589934592
58 %5:gpr(s64) = G_CONSTANT i64 0
59 %0:fpr(s128) = G_LOAD %1:gpr(p0) :: (load (s128))
60 %2:fpr(s64) = G_TRUNC %0:fpr(s128)
61 %8:gpr(s64) = COPY %2:fpr(s64)
62 %4:gpr(s64) = G_AND %8:gpr, %3:gpr
63 %7:gpr(s32) = G_ICMP intpred(ne), %4:gpr(s64), %5:gpr