2009-09-08 22:34:10 +00:00
|
|
|
; RUN: opt < %s -instcombine -S | \
|
2007-04-14 20:13:02 +00:00
|
|
|
; RUN: grep -v {store.*,.*null} | not grep store
|
2005-01-31 05:36:19 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define void @test1(i32* %P) {
|
|
|
|
store i32 undef, i32* %P
|
|
|
|
store i32 123, i32* undef
|
|
|
|
store i32 124, i32* null
|
|
|
|
ret void
|
2005-01-31 05:36:19 +00:00
|
|
|
}
|
2006-05-26 19:18:40 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define void @test2(i32* %P) {
|
|
|
|
%X = load i32* %P ; <i32> [#uses=1]
|
|
|
|
%Y = add i32 %X, 0 ; <i32> [#uses=1]
|
|
|
|
store i32 %Y, i32* %P
|
|
|
|
ret void
|
2006-05-26 19:18:40 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|