1 ; RUN: opt < %s -instcombine -S | grep "ret i32 0" 2 ; PR4424 3 declare void @ext() 4 5 define i32 @foo(i32 %ptr) { 6 entry: 7 %zero = sub i32 %ptr, %ptr ; <i32> [#uses=1] 8 %div_zero = sdiv i32 %zero, ptrtoint (i32* getelementptr (i32, i32* null, 9 i32 1) to i32) ; <i32> [#uses=1] 10 ret i32 %div_zero 11 } 12 13