blob: 56e3339370135bc999f004619551c66b15868b54 [file] [log] [blame]
Chris Lattner4acad5c2003-09-20 03:08:21 +00001; In this test, a local alloca cannot alias an incoming argument.
2
Dan Gohmanc1be92f2010-10-18 18:04:47 +00003; RUN: opt < %s -basicaa -gvn -instcombine -S | not grep sub
Chris Lattner4acad5c2003-09-20 03:08:21 +00004
Tanya Lattnerdcd188d2008-02-14 06:56:27 +00005define i32 @test(i32* %P) {
6 %X = alloca i32
7 %V1 = load i32* %P
8 store i32 0, i32* %X
9 %V2 = load i32* %P
10 %Diff = sub i32 %V1, %V2
11 ret i32 %Diff
Chris Lattner4acad5c2003-09-20 03:08:21 +000012}