Chandler Carruth | 5da5343 | 2012-07-02 18:37:59 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -basicaa -aa-eval -disable-output 2>&1 | FileCheck %s |
Nick Lewycky | f5ffcbc | 2008-11-24 03:41:24 +0000 | [diff] [blame] | 2 | |
| 3 | declare noalias i32* @_Znwj(i32 %x) nounwind |
| 4 | |
Bill Wendling | cd6df16 | 2012-04-24 09:15:38 +0000 | [diff] [blame] | 5 | ; CHECK: 1 no alias response |
| 6 | |
Nick Lewycky | f5ffcbc | 2008-11-24 03:41:24 +0000 | [diff] [blame] | 7 | define i32 @foo() { |
| 8 | %A = call i32* @_Znwj(i32 4) |
| 9 | %B = call i32* @_Znwj(i32 4) |
| 10 | store i32 1, i32* %A |
| 11 | store i32 2, i32* %B |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 12 | %C = load i32, i32* %A |
Nick Lewycky | f5ffcbc | 2008-11-24 03:41:24 +0000 | [diff] [blame] | 13 | ret i32 %C |
| 14 | } |