blob: 231521d4b74d0e1c47ca574f98671d976f1f0015 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; In this test, a local alloca cannot alias an incoming argument.
2
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00003; RUN: opt %s -gvn -instcombine -S | not grep sub
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattnera695f012008-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
Dan Gohmanf17a25c2007-07-18 16:29:46 +000012}