1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -o %t 2*9880d681SAndroid Build Coastguard Worker; RUN: grep slwi %t 3*9880d681SAndroid Build Coastguard Worker; RUN: not grep addi %t 4*9880d681SAndroid Build Coastguard Worker; RUN: not grep rlwinm %t 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workerdefine i32 @test(i32 %A) { 7*9880d681SAndroid Build Coastguard Worker ;; shift 8*9880d681SAndroid Build Coastguard Worker %B = mul i32 %A, 8 ; <i32> [#uses=1] 9*9880d681SAndroid Build Coastguard Worker ;; dead, no demanded bits. 10*9880d681SAndroid Build Coastguard Worker %C = add i32 %B, 7 ; <i32> [#uses=1] 11*9880d681SAndroid Build Coastguard Worker ;; dead once add is gone. 12*9880d681SAndroid Build Coastguard Worker %D = and i32 %C, -8 ; <i32> [#uses=1] 13*9880d681SAndroid Build Coastguard Worker ret i32 %D 14*9880d681SAndroid Build Coastguard Worker} 15*9880d681SAndroid Build Coastguard Worker 16