projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
convert to filechecconvert to filecheckk
[oota-llvm.git]
/
test
/
Transforms
/
InstCombine
/
load3.ll
1
; RUN: opt < %s -instcombine -S | FileCheck %s
2
3
; Instcombine should be able to do trivial CSE of loads.
4
5
define i32 @test1(i32* %p) {
6
%t0 = getelementptr i32* %p, i32 1
7
%y = load i32* %t0
8
%t1 = getelementptr i32* %p, i32 1
9
%x = load i32* %t1
10
%a = sub i32 %y, %x
11
ret i32 %a
12
; CHECK: @test1
13
; CHECK: ret i32 0
14
}