blob: 637d8f0db48625fef3a6ec85b9958a8500cc39d6 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; In this test, a local alloca cannot alias an incoming argument.
2
Dan Gohman3c7d3082009-09-11 18:01:28 +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}