blob: 77fdd04be167b57cdb520587c27745334941a378 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
; RUN: opt %s -instcombine | llvm-dis | grep load | count 1
; Instcombine should be able to do trivial CSE of loads.
declare void @use(double %n)
define void @bar(double* %p) {
%t0 = getelementptr double* %p, i32 1
%y = load double* %t0
%t1 = getelementptr double* %p, i32 1
%x = load double* %t1
call void @use(double %x)
call void @use(double %y)
ret void
}
|