source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/BasicAA/2003-09-19-LocalArgument.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 345 bytes
Line 
1; In this test, a local alloca cannot alias an incoming argument.
2
3; RUN: opt < %s -basicaa -gvn -instcombine -S | FileCheck %s
4
5; CHECK:      define i32 @test
6; CHECK-NEXT: ret i32 0
7
8define i32 @test(i32* %P) {
9        %X = alloca i32
10        %V1 = load i32, i32* %P
11        store i32 0, i32* %X
12        %V2 = load i32, i32* %P
13        %Diff = sub i32 %V1, %V2
14        ret i32 %Diff
15}
Note: See TracBrowser for help on using the repository browser.