; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-promote-alloca %s | FileCheck %s ; This used to crash when we deplay the value replacement in AMDGPUPromoteAlloca. ; The test might be helpful to catch similar issue around placeholder replacement. define <2 x i32> @replace_placeholder_correctly() { ; CHECK-LABEL: define <2 x i32> @replace_placeholder_correctly() { ; CHECK-NEXT: [[A:%.*]] = freeze <2 x i32> poison ; CHECK-NEXT: br label %[[BB2:.*]] ; CHECK: [[BB2]]: ; CHECK-NEXT: ret <2 x i32> [[A]] ; %a = alloca <2 x i32>, align 8, addrspace(5) br label %ret ret: %v = load <2 x i32>, ptr addrspace(5) %a, align 8 ret <2 x i32> %v }