blob: 5caa0a8eb930011e0f0fc7fef0f0cc83fd763ac2 [file] [log] [blame]
Chris Lattnere04d51f2005-03-23 23:48:56 +00001; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
2
3; This test requires the use of previous analyses to determine that
4; doesnotmodX does not modify X (because 'sin' doesn't).
5
6%X = internal global int 4
7
8declare double %sin(double)
9
10int %test(int *%P) {
11 store int 12, int* %X
12 call double %doesnotmodX(double 1.0)
13 %V = load int* %X
14 ret int %V
15}
16
17double %doesnotmodX(double %V) {
18 %V2 = call double %sin(double %V)
19 ret double %V2
20}