1 ; RUN: opt < %s -instsimplify -S | FileCheck %s
7 define i32 @shift1(i32 %A, i32 %B) {
8 %C = lshr exact i32 %A, %B
9 %D = shl nuw i32 %C, %B
16 define i32 @shift2(i32 %A, i32 %B) {
18 %D = shl nuw i32 %C, %B
24 define i32 @shift3(i32 %A, i32 %B) {
25 %C = ashr exact i32 %A, %B
26 %D = shl nuw i32 %C, %B
32 define i32 @shift4(i32 %A, i32 %B) {
33 %C = shl nuw i32 %A, %B
40 define i32 @shift5(i32 %A, i32 %B) {
41 %C = shl nsw i32 %A, %B