
Now that #149310 has restricted lifetime intrinsics to only work on allocas, we can also drop the explicit size argument. Instead, the size is implied by the alloca. This removes the ability to only mark a prefix of an alloca alive/dead. We never used that capability, so we should remove the need to handle that possibility everywhere (though many key places, including stack coloring, did not actually respect this).
33 lines
858 B
LLVM
33 lines
858 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
|
|
; Skip dead MemoryPhis when performing memory congruency verification
|
|
; in NewGVN.
|
|
; RUN: opt -S -passes=newgvn %s | FileCheck %s
|
|
; REQUIRES: asserts
|
|
|
|
|
|
declare void @llvm.lifetime.start.p0(ptr nocapture)
|
|
|
|
define void @tinkywinky() {
|
|
; CHECK-LABEL: define void @tinkywinky() {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[A:%.*]] = alloca i8, align 1
|
|
; CHECK-NEXT: br i1 false, label [[BODY:%.*]], label [[END:%.*]]
|
|
; CHECK: body:
|
|
; CHECK-NEXT: store i8 poison, ptr null, align 1
|
|
; CHECK-NEXT: br label [[END]]
|
|
; CHECK: end:
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
entry:
|
|
%a = alloca i8
|
|
call void @llvm.lifetime.start.p0(ptr %a)
|
|
br i1 false, label %body, label %end
|
|
|
|
body:
|
|
call void @llvm.lifetime.start.p0(ptr %a)
|
|
br label %end
|
|
|
|
end:
|
|
ret void
|
|
}
|