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
31 %6:gpr(s1) = G_TRUNC %7:gpr(s32)
32 G_BRCOND %6:gpr(s1), %bb.1
42 tracksRegLiveness: true
44 ; CHECK-LABEL: name: no_trunc
46 ; CHECK: successors: %bb.1(0x80000000)
48 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
49 ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY]], 0 :: (load (s128))
50 ; CHECK: [[COPY1:%[0-9]+]]:gpr64all = COPY [[LDRQui]].dsub
51 ; CHECK: [[COPY2:%[0-9]+]]:gpr64 = COPY [[COPY1]]
52 ; CHECK: TBNZX [[COPY2]], 33, %bb.1
58 %3:gpr(s64) = G_CONSTANT i64 8589934592
59 %5:gpr(s64) = G_CONSTANT i64 0
60 %0:fpr(s128) = G_LOAD %1:gpr(p0) :: (load (s128))
61 %2:fpr(s64) = G_TRUNC %0:fpr(s128)
62 %8:gpr(s64) = COPY %2:fpr(s64)
63 %4:gpr(s64) = G_AND %8:gpr, %3:gpr
64 %7:gpr(s32) = G_ICMP intpred(ne), %4:gpr(s64), %5:gpr
65 %6:gpr(s1) = G_TRUNC %7:gpr(s32)
66 G_BRCOND %6:gpr(s1), %bb.1