1 ; RUN: opt %s -basicaa -gvn -S | FileCheck %s 2 3 %t = type { i32 } 4 declare void @test1f(i8*) 5 6 define void @test1(%t* noalias %stuff ) { 7 %p = getelementptr inbounds %t* %stuff, i32 0, i32 0 8 %before = load i32* %p 9 10 call void @test1f(i8* null) 11 12 %after = load i32* %p ; <--- This should be a dead load 13 %sum = add i32 %before, %after 14 15 store i32 %sum, i32* %p 16 ret void 17 ; CHECK: load 18 ; CHECK-NOT: load 19 ; CHECK: ret void 20 } 21