1 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 ; CHECK: %y = sub i32 0, %x
5 ; CHECK: %z = sdiv i32 %y, 337
7 define i32 @sub1(i32 %x) {
14 ; CHECK: %z = sdiv i32 %x, -337
16 define i32 @sub2(i32 %x) {
17 %y = sub nsw i32 0, %x
23 ; CHECK: %B = icmp eq i64 %X, 0
25 define i1 @shl_icmp(i64 %X) nounwind {
26 %A = shl nuw i64 %X, 2 ; X/4
27 %B = icmp eq i64 %A, 0
32 ; CHECK: %B = shl nuw nsw i64 %A, 8
34 define i64 @shl1(i64 %X, i64* %P) nounwind {
36 store i64 %A, i64* %P ; multiple uses of A.