comparison test/Analysis/BasicAA/2009-03-04-GEPNoalias.ll @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 95c75e76d11b
children
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
1 ; RUN: opt < %s -basicaa -gvn -S | FileCheck %s 1 ; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
2 2
3 declare noalias i32* @noalias() 3 declare noalias i32* @noalias()
4 4
5 define i32 @test(i32 %x) { 5 define i32 @test(i32 %x) {
6 ; CHECK: load i32* %a 6 ; CHECK: load i32, i32* %a
7 %a = call i32* @noalias() 7 %a = call i32* @noalias()
8 store i32 1, i32* %a 8 store i32 1, i32* %a
9 %b = getelementptr i32* %a, i32 %x 9 %b = getelementptr i32, i32* %a, i32 %x
10 store i32 2, i32* %b 10 store i32 2, i32* %b
11 11
12 %c = load i32* %a 12 %c = load i32, i32* %a
13 ret i32 %c 13 ret i32 %c
14 } 14 }