xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/2008-02-16-SDivOverflow2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -instcombine -S | grep "sdiv i8 \%a, 9"
2*9880d681SAndroid Build Coastguard Worker; PR2048
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workerdefine i8 @i(i8 %a) {
5*9880d681SAndroid Build Coastguard Worker  %tmp1 = sdiv i8 %a, -3
6*9880d681SAndroid Build Coastguard Worker  %tmp2 = sdiv i8 %tmp1, -3
7*9880d681SAndroid Build Coastguard Worker  ret i8 %tmp2
8*9880d681SAndroid Build Coastguard Worker}
9*9880d681SAndroid Build Coastguard Worker
10