Chris Lattner | 2d34c6c | 2008-12-10 01:04:47 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | opt -aa-eval -print-all-alias-modref-info -disable-output |& grep {MustAlias:.*%R,.*%r} |
| 2 | ; Make sure that basicaa thinks R and r are must aliases. |
| 3 | |
| 4 | define i32 @test(i8 * %P) { |
| 5 | entry: |
| 6 | %Q = bitcast i8* %P to {i32, i32}* |
| 7 | %R = getelementptr {i32, i32}* %Q, i32 0, i32 1 |
| 8 | %S = load i32* %R |
| 9 | |
| 10 | %q = bitcast i8* %P to {i32, i32}* |
| 11 | %r = getelementptr {i32, i32}* %q, i32 0, i32 1 |
| 12 | %s = load i32* %r |
| 13 | |
| 14 | %t = sub i32 %S, %s |
| 15 | ret i32 %t |
| 16 | } |