1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -verify-machineinstrs -stop-after=irtranslator -o - %s | FileCheck %s
4 @var = global i32 undef
7 ; CHECK-LABEL: name: test
8 ; CHECK: bb.1 (%ir-block.0):
9 ; CHECK-NEXT: [[GV:%[0-9]+]]:_(p0) = G_GLOBAL_VALUE @var
10 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[GV]](p0)
11 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
12 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
13 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
14 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
15 ; CHECK-NEXT: $vgpr0 = COPY [[COPY3]](s32)
16 ; CHECK-NEXT: SI_RETURN implicit $vgpr0
17 ret i32 bitcast (<1 x i32> <i32 extractelement (<1 x i32> bitcast (i32 ptrtoint (ptr @var to i32) to <1 x i32>), i64 0)> to i32)