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 -verify-machineinstrs -o - %s | FileCheck %s
6 tracksRegLiveness: true
10 ; CHECK-LABEL: name: s32_bitcast
11 ; CHECK: liveins: $vgpr0
13 ; CHECK-NEXT: %src:_(<2 x s16>) = COPY $vgpr0
14 ; CHECK-NEXT: $vgpr0 = COPY %src(<2 x s16>)
15 %src:_(<2 x s16>) = COPY $vgpr0
16 %b1:_(s32) = G_BITCAST %src
17 %b2:_(<2 x s16>) = G_BITCAST %b1
23 tracksRegLiveness: true
27 ; CHECK-LABEL: name: s64_bitcast
28 ; CHECK: liveins: $vgpr0_vgpr1
30 ; CHECK-NEXT: %src:_(<2 x s32>) = COPY $vgpr0_vgpr1
31 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY %src(<2 x s32>)
32 %src:_(<2 x s32>) = COPY $vgpr0_vgpr1
33 %b1:_(s64) = G_BITCAST %src
34 %b2:_(<2 x s32>) = G_BITCAST %b1
35 $vgpr0_vgpr1 = COPY %b2
39 name: s64_bitcast_differentypes_nofold
40 tracksRegLiveness: true
44 ; CHECK-LABEL: name: s64_bitcast_differentypes_nofold
45 ; CHECK: liveins: $vgpr0_vgpr1
47 ; CHECK-NEXT: %src:_(<2 x s32>) = COPY $vgpr0_vgpr1
48 ; CHECK-NEXT: %b1:_(s64) = G_BITCAST %src(<2 x s32>)
49 ; CHECK-NEXT: %b2:_(<4 x s16>) = G_BITCAST %b1(s64)
50 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY %b2(<4 x s16>)
51 %src:_(<2 x s32>) = COPY $vgpr0_vgpr1
52 %b1:_(s64) = G_BITCAST %src
53 %b2:_(<4 x s16>) = G_BITCAST %b1
54 $vgpr0_vgpr1 = COPY %b2