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-prelegalizer-combiner -o - %s | FileCheck %s
5 name: fptrunc_fpext_s16_to_s32_to_s16
6 tracksRegLiveness: true
10 ; CHECK-LABEL: name: fptrunc_fpext_s16_to_s32_to_s16
11 ; CHECK: liveins: $vgpr0
13 ; CHECK-NEXT: %reg:_(s32) = COPY $vgpr0
14 ; CHECK-NEXT: $vgpr0 = COPY %reg(s32)
15 %reg:_(s32) = COPY $vgpr0
16 %src:_(s16) = G_TRUNC %reg
17 %fpext:_(s32) = G_FPEXT %src
18 %fptrunc:_(s16) = G_FPTRUNC %fpext
19 %anyext:_(s32) = G_ANYEXT %fptrunc
24 name: fptrunc_fpext_s16_to_s64_to_s32
25 tracksRegLiveness: true
29 ; CHECK-LABEL: name: fptrunc_fpext_s16_to_s64_to_s32
30 ; CHECK: liveins: $vgpr0
32 ; CHECK-NEXT: %reg:_(s32) = COPY $vgpr0
33 ; CHECK-NEXT: %src:_(s16) = G_TRUNC %reg(s32)
34 ; CHECK-NEXT: %fpext:_(s64) = G_FPEXT %src(s16)
35 ; CHECK-NEXT: %fptrunc:_(s32) = G_FPTRUNC %fpext(s64)
36 ; CHECK-NEXT: $vgpr0 = COPY %fptrunc(s32)
37 %reg:_(s32) = COPY $vgpr0
38 %src:_(s16) = G_TRUNC %reg
39 %fpext:_(s64) = G_FPEXT %src
40 %fptrunc:_(s32) = G_FPTRUNC %fpext
41 $vgpr0 = COPY %fptrunc
45 name: fptrunc_fpext_v2s16_to_v2s32_to_v2s16
46 tracksRegLiveness: true
50 ; CHECK-LABEL: name: fptrunc_fpext_v2s16_to_v2s32_to_v2s16
51 ; CHECK: liveins: $vgpr0
53 ; CHECK-NEXT: %src:_(<2 x s16>) = COPY $vgpr0
54 ; CHECK-NEXT: $vgpr0 = COPY %src(<2 x s16>)
55 %src:_(<2 x s16>) = COPY $vgpr0
56 %fpext:_(<2 x s32>) = G_FPEXT %src
57 %fptrunc:_(<2 x s16>) = G_FPTRUNC %fpext
58 $vgpr0 = COPY %fptrunc
62 name: fptrunc_fpext_v2s16_to_v2s64_to_v2s32
63 tracksRegLiveness: true
67 ; CHECK-LABEL: name: fptrunc_fpext_v2s16_to_v2s64_to_v2s32
68 ; CHECK: liveins: $vgpr0
70 ; CHECK-NEXT: %src:_(<2 x s16>) = COPY $vgpr0
71 ; CHECK-NEXT: %fpext:_(<2 x s64>) = G_FPEXT %src(<2 x s16>)
72 ; CHECK-NEXT: %fptrunc:_(<2 x s32>) = G_FPTRUNC %fpext(<2 x s64>)
73 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY %fptrunc(<2 x s32>)
74 %src:_(<2 x s16>) = COPY $vgpr0
75 %fpext:_(<2 x s64>) = G_FPEXT %src
76 %fptrunc:_(<2 x s32>) = G_FPTRUNC %fpext
77 $vgpr0_vgpr1 = COPY %fptrunc