1a0ff26e0SNikita Popov; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 20676acb6SBjorn Pettersson; RUN: opt -S -passes=globalopt < %s | FileCheck %s 3a0ff26e0SNikita Popov 4a0ff26e0SNikita Popov; In this case an instruction queued for recursive deletion gets RAUWd with 5a0ff26e0SNikita Popov; a constant in the meantime. Make sure this does not cause an assertion 6a0ff26e0SNikita Popov; failure. 7a0ff26e0SNikita Popov 8*d586bd5cSNikita Popov@a = internal global ptr null 9*d586bd5cSNikita Popov@b = internal global ptr @a 10a0ff26e0SNikita Popov 11a0ff26e0SNikita Popovdefine void @test() { 12a0ff26e0SNikita Popov; CHECK-LABEL: @test( 13a0ff26e0SNikita Popov; CHECK-NEXT: ret void 14a0ff26e0SNikita Popov; 15*d586bd5cSNikita Popov %v1 = load ptr, ptr @b 16*d586bd5cSNikita Popov %v2 = load ptr, ptr %v1 17*d586bd5cSNikita Popov store ptr %v2, ptr @a 18a0ff26e0SNikita Popov ret void 19a0ff26e0SNikita Popov} 20a0ff26e0SNikita Popov 21