1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -global-isel -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 -o - -stop-after=irtranslator %s | FileCheck %s
4 ; Check that the CSEMIRBuilder doesn't fold away the getelementptr during IRTranslator
5 define ptr addrspace(7) @no_auto_constfold_gep() {
6 ; CHECK-LABEL: name: no_auto_constfold_gep
7 ; CHECK: bb.1 (%ir-block.0):
8 ; CHECK-NEXT: [[C:%[0-9]+]]:_(p8) = G_CONSTANT i128 0
9 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 123
10 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[C]](p8)
11 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
12 ; CHECK-NEXT: $vgpr1 = COPY [[UV1]](s32)
13 ; CHECK-NEXT: $vgpr2 = COPY [[UV2]](s32)
14 ; CHECK-NEXT: $vgpr3 = COPY [[UV3]](s32)
15 ; CHECK-NEXT: $vgpr4 = COPY [[C1]](s32)
16 ; CHECK-NEXT: SI_RETURN implicit $vgpr0, implicit $vgpr1, implicit $vgpr2, implicit $vgpr3, implicit $vgpr4
17 %gep = getelementptr i8, ptr addrspace(7) null, i32 123
18 ret ptr addrspace(7) %gep