1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
7 tracksRegLiveness: true
11 ; CHECK-LABEL: name: legalize_s32
12 ; CHECK: liveins: $s0, $s1
13 ; CHECK: %val:_(s32) = COPY $s0
14 ; CHECK: %sign:_(s32) = COPY $s1
15 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
16 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
17 ; CHECK: [[IVEC:%[0-9]+]]:_(<4 x s32>) = G_INSERT_VECTOR_ELT [[DEF]], %val(s32), [[C]](s32)
18 ; CHECK: [[IVEC1:%[0-9]+]]:_(<4 x s32>) = G_INSERT_VECTOR_ELT [[DEF]], %sign(s32), [[C]](s32)
19 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -2147483648
20 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[C1]](s32), [[C1]](s32), [[C1]](s32), [[C1]](s32)
21 ; CHECK: [[BIT:%[0-9]+]]:_(<4 x s32>) = G_BIT [[IVEC]], [[IVEC1]], [[BUILD_VECTOR]]
22 ; CHECK: %fcopysign:_(s32), %10:_(s32), %11:_(s32), %12:_(s32) = G_UNMERGE_VALUES [[BIT]](<4 x s32>)
23 ; CHECK: $s0 = COPY %fcopysign(s32)
24 ; CHECK: RET_ReallyLR implicit $s0
25 %val:_(s32) = COPY $s0
26 %sign:_(s32) = COPY $s1
27 %fcopysign:_(s32) = G_FCOPYSIGN %val, %sign(s32)
28 $s0 = COPY %fcopysign(s32)
29 RET_ReallyLR implicit $s0
34 tracksRegLiveness: true
38 ; CHECK-LABEL: name: legalize_s64
39 ; CHECK: liveins: $d0, $d1
40 ; CHECK: %val:_(s64) = COPY $d0
41 ; CHECK: %sign:_(s64) = COPY $d1
42 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
43 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
44 ; CHECK: [[IVEC:%[0-9]+]]:_(<2 x s64>) = G_INSERT_VECTOR_ELT [[DEF]], %val(s64), [[C]](s64)
45 ; CHECK: [[IVEC1:%[0-9]+]]:_(<2 x s64>) = G_INSERT_VECTOR_ELT [[DEF]], %sign(s64), [[C]](s64)
46 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
47 ; CHECK: [[FNEG:%[0-9]+]]:_(<2 x s64>) = G_FNEG [[BUILD_VECTOR]]
48 ; CHECK: [[BIT:%[0-9]+]]:_(<2 x s64>) = G_BIT [[IVEC]], [[IVEC1]], [[FNEG]]
49 ; CHECK: %fcopysign:_(s64), %10:_(s64) = G_UNMERGE_VALUES [[BIT]](<2 x s64>)
50 ; CHECK: $d0 = COPY %fcopysign(s64)
51 ; CHECK: RET_ReallyLR implicit $d0
52 %val:_(s64) = COPY $d0
53 %sign:_(s64) = COPY $d1
54 %fcopysign:_(s64) = G_FCOPYSIGN %val, %sign(s64)
55 $d0 = COPY %fcopysign(s64)
56 RET_ReallyLR implicit $d0