2009-11-02 01:58:03 +00:00
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
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
|
2009-11-02 01:58:03 +00:00
|
|
|
; CHECK: @test1(
|
|
|
|
; CHECK-NEXT: store i32 undef, i32* null
|
|
|
|
; CHECK-NEXT: 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
|
2009-11-02 01:58:03 +00:00
|
|
|
; CHECK: @test2
|
|
|
|
; CHECK-NEXT: ret void
|
2006-05-26 19:18:40 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|