1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=amdgpu-postlegalizer-combiner -verify-machineinstrs -o - %s | FileCheck %s
5 name: test_fcanonicalize_fcanonicalize_s32
6 tracksRegLiveness: true
11 ; CHECK-LABEL: name: test_fcanonicalize_fcanonicalize_s32
12 ; CHECK: liveins: $vgpr0
14 ; CHECK-NEXT: %src0:_(s32) = COPY $vgpr0
15 ; CHECK-NEXT: %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
16 ; CHECK-NEXT: %ptr:_(p1) = G_IMPLICIT_DEF
17 ; CHECK-NEXT: G_STORE %fcanonicalize0(s32), %ptr(p1) :: (store (s32), addrspace 1)
18 %src0:_(s32) = COPY $vgpr0
19 %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
20 %fcanonicalize1:_(s32) = G_FCANONICALIZE %fcanonicalize0
21 %ptr:_(p1) = G_IMPLICIT_DEF
22 G_STORE %fcanonicalize1, %ptr :: (store (s32), addrspace 1, align 4)
26 name: test_fcanonicalize_fcanonicalize_fcanonicalize_s32
27 tracksRegLiveness: true
32 ; CHECK-LABEL: name: test_fcanonicalize_fcanonicalize_fcanonicalize_s32
33 ; CHECK: liveins: $vgpr0
35 ; CHECK-NEXT: %src0:_(s32) = COPY $vgpr0
36 ; CHECK-NEXT: %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
37 ; CHECK-NEXT: %ptr:_(p1) = G_IMPLICIT_DEF
38 ; CHECK-NEXT: G_STORE %fcanonicalize0(s32), %ptr(p1) :: (store (s32), addrspace 1)
39 %src0:_(s32) = COPY $vgpr0
40 %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
41 %fcanonicalize1:_(s32) = G_FCANONICALIZE %fcanonicalize0
42 %fcanonicalize2:_(s32) = G_FCANONICALIZE %fcanonicalize1
43 %ptr:_(p1) = G_IMPLICIT_DEF
44 G_STORE %fcanonicalize2, %ptr :: (store (s32), addrspace 1, align 4)
48 name: test_fcanonicalize_fcanonicalize_s32_multi_use
49 tracksRegLiveness: true
55 ; CHECK-LABEL: name: test_fcanonicalize_fcanonicalize_s32_multi_use
56 ; CHECK: liveins: $vgpr0
58 ; CHECK-NEXT: %src0:_(s32) = COPY $vgpr0
59 ; CHECK-NEXT: %ptr:_(p1) = G_IMPLICIT_DEF
60 ; CHECK-NEXT: %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
61 ; CHECK-NEXT: G_STORE %fcanonicalize0(s32), %ptr(p1) :: (volatile store (s32), addrspace 1)
62 ; CHECK-NEXT: G_STORE %fcanonicalize0(s32), %ptr(p1) :: (volatile store (s32), addrspace 1)
63 ; CHECK-NEXT: G_STORE %fcanonicalize0(s32), %ptr(p1) :: (volatile store (s32), addrspace 1)
64 %src0:_(s32) = COPY $vgpr0
65 %ptr:_(p1) = G_IMPLICIT_DEF
67 %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
68 G_STORE %fcanonicalize0, %ptr :: (volatile store (s32), addrspace 1, align 4)
70 %fcanonicalize1:_(s32) = G_FCANONICALIZE %fcanonicalize0
71 G_STORE %fcanonicalize1, %ptr :: (volatile store (s32), addrspace 1, align 4)
73 G_STORE %fcanonicalize1, %ptr :: (volatile store (s32), addrspace 1, align 4)
77 name: test_fcanonicalize_copy_fcanonicalize_s32
78 tracksRegLiveness: true
83 ; CHECK-LABEL: name: test_fcanonicalize_copy_fcanonicalize_s32
84 ; CHECK: liveins: $vgpr0
86 ; CHECK-NEXT: %src0:_(s32) = COPY $vgpr0
87 ; CHECK-NEXT: %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
88 ; CHECK-NEXT: %ptr:_(p1) = G_IMPLICIT_DEF
89 ; CHECK-NEXT: G_STORE %fcanonicalize0(s32), %ptr(p1) :: (store (s32), addrspace 1)
90 %src0:_(s32) = COPY $vgpr0
91 %fcanonicalize0:_(s32) = G_FCANONICALIZE %src0
92 %copy:_(s32) = COPY %fcanonicalize0
93 %fcanonicalize1:_(s32) = G_FCANONICALIZE %copy
94 %ptr:_(p1) = G_IMPLICIT_DEF
95 G_STORE %fcanonicalize1, %ptr :: (store (s32), addrspace 1, align 4)