bolt/deps/llvm-18.1.8/llvm/test/Transforms/GlobalOpt/recursively-delete-dead-inst-assertion.ll

21 lines
508 B
LLVM
Raw Normal View History

2025-02-14 19:21:04 +01:00
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=globalopt < %s | FileCheck %s
; In this case an instruction queued for recursive deletion gets RAUWd with
; a constant in the meantime. Make sure this does not cause an assertion
; failure.
@a = internal global ptr null
@b = internal global ptr @a
define void @test() {
; CHECK-LABEL: @test(
; CHECK-NEXT: ret void
;
%v1 = load ptr, ptr @b
%v2 = load ptr, ptr %v1
store ptr %v2, ptr @a
ret void
}