1#RUN: not --crash llc -mtriple=amdgcn-amd-amdhsa -o - -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
2# REQUIRES: amdgpu-registered-target
3
4---
5name:            test_bitcast
6legalized:       true
7regBankSelected: false
8selected:        false
9tracksRegLiveness: true
10liveins:
11body:             |
12  bb.0:
13   ; CHECK:  Bad machine code: bitcast cannot convert between pointers and other types
14    %0:_(s64) = G_IMPLICIT_DEF
15    %1:_(p0) = G_BITCAST %0
16
17    ; CHECK:  Bad machine code: bitcast cannot convert between pointers and other
18    %2:_(p0) = G_IMPLICIT_DEF
19    %3:_(s64) = G_BITCAST %2
20
21    ; CHECK: Bad machine code: bitcast sizes must match
22    %4:_(s32) = G_IMPLICIT_DEF
23    %5:_(s64) = G_BITCAST %4
24
25    ; CHECK: Bad machine code: bitcast sizes must match
26    %6:_(s32) = G_IMPLICIT_DEF
27    %7:_(<3 x s8>) = G_BITCAST %6
28
29    ; CHECK: Bad machine code: bitcast sizes must match
30    %8:_(p1) = G_IMPLICIT_DEF
31    %9:_(p3) = G_BITCAST %8
32
33    ; CHECK: Bad machine code: bitcast sizes must match
34    %10:_(p1) = G_IMPLICIT_DEF
35    %11:_(p3) = G_BITCAST %8
36
37    ; CHECK: Bad machine code: bitcast must change the type
38    %12:_(s64) = G_BITCAST %0
39...
40