blob: 666621119d4cb4b796cf16c1664f61ee4a0e689e [file] [log] [blame]
; RUN: opt < %s -passes=newgvn -S | FileCheck %s
%t = type { i32 }
declare void @test1f(ptr)
define void @test1(ptr noalias %stuff ) {
%before = load i32, ptr %stuff
call void @test1f(ptr null)
%after = load i32, ptr %stuff ; <--- This should be a dead load
%sum = add i32 %before, %after
store i32 %sum, ptr %stuff
ret void
; CHECK: load
; CHECK-NOT: load
; CHECK: ret void
}